llvm-project/flang/test/Driver/code-gen-x86.f90
Sergio Afonso 41a1415dc3 [Flang][Driver][NFC] Improve -emit-obj unit tests
Instead of looking for the existence of a `ret` instruction after disassembly
as a way to check that the right ISA is present in the produced binary, check
instead the ELF header of the file. This is a more reliable solution, since the
alternative can easily result in false positives.

Differential Revision: https://reviews.llvm.org/D149578
2023-05-04 10:13:07 +01:00

10 lines
207 B
Fortran

! Test -emit-obj (X86)
! REQUIRES: x86-registered-target
! RUN: %flang_fc1 -triple x86_64-unknown-linux-gnu -emit-obj %s -o - | \
! RUN: llvm-readobj -h - | FileCheck %s
! CHECK: Arch: x86_64
end program