llvm-project/flang/test/Parser/unparseable.f90
Peter Klausler 977e75c98d
[flang] More graceful parse failures at EOF (#159834)
Rather than admit complete confusion with a "FAIL" message when parsing
runs into the end of the source file unexpectedly, deal better with
missing or garbled END statements through the use of `consumedAllInput`
in end-of-line and end-of-statement parsers and error recovery. Adds a
new test (the original motivation) and updates the expected results in
two extant tests that were failing before.
2025-09-23 15:44:40 -07:00

10 lines
316 B
Fortran

! RUN: not %flang_fc1 -fsyntax-only %s 2>&1 | FileCheck %s
! CHECK:error: end of file
! CHECK:in the context: END PROGRAM statement
! CHECK:unparseable.f90:9:1: in the context: main program
! CHECK:error: end of file
! CHECK:unparseable.f90:9:1: in the context: SELECT TYPE construct
module m
end
select type (barf)