The current RUN line leaves a parse-ir-error.s file around, which might confuse the buildbots. Direct the output into the void instead (although it would probably be better to direct it to FileCheck).
19 lines
519 B
Fortran
19 lines
519 B
Fortran
! This file is a valid Fortran file, but we force the driver to treat it as an
|
|
! LLVM file (with the `-x` flag). This way we verify that the driver correctly
|
|
! rejects invalid LLVM IR input.
|
|
|
|
!----------
|
|
! RUN LINES
|
|
!----------
|
|
! Input type is implicit (correctly assumed to be Fortran)
|
|
! RUN: %flang_fc1 -S -o /dev/null %s
|
|
! Input type is explicitly set as LLVM IR
|
|
! RUN: not %flang -S -x ir %s 2>&1 | FileCheck %s
|
|
|
|
!----------------
|
|
! EXPECTED OUTPUT
|
|
!----------------
|
|
! CHECK: error: Could not parse IR
|
|
|
|
end program
|