1; This file is a valid LLVM IR file, but we force the driver to treat it as
2; Fortran (with the `-x` flag). This way we verify that the driver
3; correctly rejects invalid Fortran input.
4
5;----------
6; RUN LINES
7;----------
8; Input type is implicit (correctly assumed to be LLVM IR)
9; RUN: %flang_fc1 -S %s -o -
10
11; Input type is explicitly set as Fortran
12; Verify that parsing errors are correctly reported by the driver
13; Focuses on actions inheriting from the following:
14; * PrescanAndSemaAction (-fsyntax-only)
15; * PrescanAndParseAction (-fdebug-unparse-no-sema)
16; RUN: not %flang_fc1 -fdebug-unparse-no-sema -x f95 %s 2>&1 | FileCheck %s --check-prefix=ERROR
17; RUN: not %flang_fc1 -fsyntax-only %s -x f95 2>&1 | FileCheck %s --check-prefix=ERROR
18
19; ERROR: Could not parse {{.*}}parse-error.f95
20
21define void @foo() {
22  ret void
23}
24