Files
clang-p2996/flang/test/Driver/func-attr.f90
Andrzej Warzynski c7c912cff9 [flang][nfc] Add missing REQUIRES directive in a test
Failing bot:
  * https://lab.llvm.org/buildbot/#/builders/21/builds/88731

Failing test was introduced in:
  * https://github.com/llvm/llvm-project/pull/74598

Sending without a review as the fix is straightforward and I want to
prioritize fixing the broken bot and unblocking everyone who's been
affected.
2023-12-31 10:55:56 +00:00

26 lines
1.1 KiB
Fortran

! Test that -mframe-pointer can accept only specific values and when given an invalid value, check it raises an error.
! REQUIRES: aarch64-registered-target
! RUN: %flang_fc1 -triple aarch64-none-none -mframe-pointer=none -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefix=CHECK-NONEFP
! RUN: %flang_fc1 -triple aarch64-none-none -mframe-pointer=non-leaf -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefix=CHECK-NONLEAFFP
! RUN: %flang_fc1 -triple aarch64-none-none -mframe-pointer=all -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefix=CHECK-ALLFP
! RUN: not %flang_fc1 -triple aarch64-none-none -mframe-pointer=wrongval -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefix=CHECK-WRONGVALUEFP
! CHECK-NONEFP-LABEL: @func_() {
! CHECK-NONLEAFFP-LABEL: @func_()
! CHECK-NONLEAFFP-SAME: #0
! CHECK-ALLFP-LABEL: @func_()
! CHECK-ALLFP-SAME: #0
subroutine func
end subroutine func
! CHECK-NONEFP-NOT: attributes #0 = { "frame-pointer"="{{.*}}" }
! CHECK-NONLEAFFP: attributes #0 = { "frame-pointer"="non-leaf" }
! CHECK-ALLFP: attributes #0 = { "frame-pointer"="all" }
! CHECK-WRONGVALUEFP:error: invalid value 'wrongval' in '-mframe-pointer=wrongval'