Files
clang-p2996/flang/test/Parser/missing-then.f90
Peter Klausler 60b673023f [flang] Better error recovery for missing THEN in IF construct
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
2023-05-18 11:41:07 -07:00

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