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