Issue 128015
Summary [flang][openmp] real(10) prevents compilation even when it is not used in device code
Labels flang
Assignees
Reporter VeeEM
    At least for amdgpu, code containing real(10) can no longer be compiled with offloading enabled after 2bfb3bae69718525fd9b1dc6e2dec9387c647a9e.

Compiling a program containing a real(10) variable used to print a warning, now it's an error:
```
program prog1
real(10) :: x
end program
```
```
$ flang-new -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa --offload-arch=gfx90a prog1.f90
error: Semantic errors in prog1.f90
./prog1.f90:2:1: error: REAL(KIND=10) is not an enabled type for this target
  real(10) :: x
  ^^^^^^^^^^^^^
```

Using a module containing real(10) is also an error now, previously this did not even print a warning:
```
module m
contains
subroutine f(x)
real(10) :: x
end subroutine
end module
```
```
program prog2
use m
end program
```
```
$ flang-new -c m.f90
$ flang-new -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa --offload-arch=gfx90a prog2.f90
error: Semantic errors in prog2.f90
./m.mod:5:1: error: REAL(KIND=10) is not an enabled type for this target
  real(10)::x
  ^^^^^^^^^^^
```
I'm thinking real(10) should probably only be an error if used on device.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to