xref: /llvm-project/flang/test/Driver/parse-ir-error.f95 (revision d5d420bb3bcc2eea926fb70fc3e6818c32e1eecc)
1! This file is a valid Fortran file, but we force the driver to treat it as an
2! LLVM file (with the `-x` flag). This way we verify that the driver correctly
3! rejects invalid LLVM IR input.
4
5! Input type is implicit (correctly assumed to be Fortran)
6! RUN: %flang_fc1 -S -o /dev/null %s
7! Input type is explicitly set as LLVM IR
8! RUN: not %flang -S -x ir %s 2>&1 | FileCheck %s
9
10! CHECK: error: Could not parse IR
11
12end program
13