Skip to content

[flang][OpenMP] "Call parameter type does not match function signature!" for private variables #130159

Closed
@mjklemm

Description

@mjklemm

When compiling the below rerproducer, the compiler asserts with the following message:

> flang-new -fopenmp --offload-arch=gfx90a -c bad_signature_reproducer.f90 -o bad_signature_reproducer.o
flang-21: warning: OpenMP support in flang is still experimental [-Wexperimental-option]
flang-21: warning: OpenMP support in flang is still experimental [-Wexperimental-option]
flang-21: warning: OpenMP support in flang is still experimental [-Wexperimental-option]
Call parameter type does not match function signature!
  %omp.private.alloc = alloca i32, align 4, addrspace(5)
 ptr  call void @_QMotherProutine(ptr addrspace(5) %omp.private.alloc)
error: failed to create the LLVM module

This seems to be a regression that was introduced with #124019.

Reproducer:

module other
contains
    subroutine routine(i)
        implicit none
        integer(4) :: i
    end subroutine routine
end module other

module mod
    implicit none
contains
    subroutine failing(d)
        use other, only: routine
        implicit none
        integer(4) :: i, d

        !$omp target teams distribute parallel do
        do i = 1, d
            call routine(i)
        end do
    end subroutine failing
end module mod

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions