No longer require -fopenmp or -fopenacc with -E, unless specific version number options are also required for predefined macros. This means that most source can be preprocessed with -E and then later compiled with -fopenmp, -fopenacc, or neither. This means that OpenMP conditional compilation lines (!$) are also passed through to -E output. The tricky part of this patch was dealing with the fact that those conditional lines can also contain regular Fortran line continuation, and that now has to be deferred when !$ lines are interspersed.
9 lines
233 B
Fortran
9 lines
233 B
Fortran
! RUN: %flang_fc1 -E %s 2>&1 | FileCheck %s
|
|
!CHECK: subroutine r4(x) Z real :: x Z !$acc routine Z print *, x Z end
|
|
#define SUB(s, t) subroutine s(x) Z\
|
|
t :: x Z\
|
|
!$acc routine Z\
|
|
print *, x Z\
|
|
end subroutine s
|
|
SUB(r4, real)
|