This patch fixes #72748 by modifying the processing of program units to search for a symbol to which OpenMP REQUIRES clauses can bind to. Rather than picking up the first PFT node with a source reference and getting its associated scope, it picks up the last one. This avoids using the source from the first specification construct of a nameless program, which can sometimes not be associated to any scope, causing an ICE due to an invalid source location.
8 lines
155 B
Fortran
8 lines
155 B
Fortran
! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
|
|
! Check OpenMP compatibility with the DEC STRUCTURE extension
|
|
|
|
structure /s/
|
|
end structure
|
|
|
|
end
|