| Issue |
165874
|
| Summary |
[flang] [OpenMP] Flang inline directive regression
|
| Labels |
flang
|
| Assignees |
|
| Reporter |
scamp-nvidia
|
There is a new regression with Flang OpenMP inline directive handling. We have narrowed it down to occurring between 22079e3f3698d5c367c7b67f63de8c838791ae76 and 9a51879253dbc21bb3ad8f0b04345fe76f9d2097. Consider the following test.F90 code with inline OpenMP directives:
```
subroutine kern_xx(NA, BLK, NSP, OUT, A1, A2)
implicit none
integer :: NA, BLK, NSP
integer :: M, MM
real(8) :: OUT(NA)
complex(8) :: A1(BLK*NSP), A2(BLK*NSP)
!$OMP PARALLEL SHARED(NSP,OUT,A1,A2) !$OMP PRIVATE(M,MM)
!$OMP END PARALLEL
end subroutine kern_xx
```
Compiling this with Flang before 22079e3f3698d5c367c7b67f63de8c838791ae76 generates everything okay, but after 9a51879253dbc21bb3ad8f0b04345fe76f9d2097 we get the following error:
```
scamp$ flang test.F90 -c -fopenmp
error: Could not parse test.F90
./test.F90:8:50: error: expected 'END'
!$OMP PARALLEL SHARED(NSP,OUT,A1,A2) !$OMP PRIVATE(M,MM)
^
./test.F90:8:44: in the context: execution part construct
!$OMP PARALLEL SHARED(NSP,OUT,A1,A2) !$OMP PRIVATE(M,MM)
^
./test.F90:8:1: in the context: OpenMP construct
!$OMP PARALLEL SHARED(NSP,OUT,A1,A2) !$OMP PRIVATE(M,MM)
^
```
The same code compiled with GCC and NVHPC works perfectly fine - and like I said, before the given hash range, Flang handled it fine. Looking at the commit range, I'm very suspicious of 9a51879253dbc21bb3ad8f0b04345fe76f9d2097 causing the regression since it altered how some inline directives are handled - tagging @Meinersbur and @EbinJose2002 for a check over, since they worked on the suspicious issue.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs