Presented with "IF (...)" with no following tokens in the statement, diagnose a missing "THEN" instead of complaining about all of the possible action statement initial tokens that could have been there for a non-construct IF statement. Fixes https://github.com/llvm/llvm-project/issues/62299. Differential Revision: https://reviews.llvm.org/D150783
9 lines
177 B
Fortran
9 lines
177 B
Fortran
! RUN: not %flang_fc1 -fsyntax-only %s 2>&1 | FileCheck %s
|
|
!CHECK: expected 'THEN'
|
|
!CHECK-NOT: expected 'PAUSE'
|
|
if (.TRUE.)
|
|
!CHECK: expected 'THEN'
|
|
else if (.FALSE.)
|
|
end if
|
|
end
|