| 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 |
; 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 Fortran |
| 9 |
; Verify that parsing errors are correctly reported by the driver |
| 10 |
; 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=ERROR |
| 14 |
; RUN: not %flang_fc1 -fsyntax-only %s -x f95 2>&1 | FileCheck %s --check-prefix=ERROR |
| 15 |
|
| 16 |
; ERROR: Could not parse {{.*}}parse-error.f95 |
| 17 |
|
| 18 |
define void @foo() { |
| 19 |
ret void |
| 20 |
} |