Files
clang-p2996/flang/test/Driver/code-object-version.f90
Dominik Adamski 95943d2fab [Flang] Add code-object-version option (#72638)
Information about code object version can be configured by the user for
AMD GPU target and it needs to be placed in LLVM IR generated by Flang.

Information about code object version in MLIR generated by the parser
can be reused by other tools. There is no need to specify extra flags if
we want to invoke MLIR tools (like fir-opt) separately.

Changes in comparison to a8ac93:
 * added information about required targets for test
   flang/test/Driver/driver-help.f90
2023-11-29 03:01:01 -06:00

10 lines
590 B
Fortran

! REQUIRES: x86-registered-target, amdgpu-registered-target
! RUN: not %flang -target amdgcn-amd-amdhsa -target-cpu gfx908 -mcode-object-version=3 -S %s -o \
! RUN: /dev/null 2>&1 | FileCheck --check-prefix=INVALID_VERSION %s
! RUN: %flang -target x86_64-unknown-linux-gnu -mcode-object-version=3 -S %s -o \
! RUN: /dev/null 2>&1 | FileCheck --check-prefix=UNUSED_PARAM %s
! INVALID_VERSION: error: invalid integral value '3' in '-mcode-object-version=3'
! UNUSED_PARAM: warning: argument unused during compilation: '-mcode-object-version=3' [-Wunused-command-line-argument]