When an illegal character appears in Fortran source (after preprocessing), catch and report it in the prescanning phase rather than leaving it for the parser to cope with. Differential Revision: https://reviews.llvm.org/D86553
16 lines
391 B
Fortran
16 lines
391 B
Fortran
! RUN: (%f18 -E %s 2>&1 || true) | FileCheck %s
|
|
! CHECK: error: bad character ('&') in Fortran token
|
|
! #define KWM &, use for continuation w/o pasting (ifort and nag seem to continue #define)
|
|
#define KWM &
|
|
|
|
integer :: j
|
|
j = 666
|
|
j = j + KWM
|
|
111
|
|
if (j .eq. 777) then
|
|
print *, 'pp130.F90 yes'
|
|
else
|
|
print *, 'pp130.F90 no', j
|
|
end if
|
|
end
|