[LLVM] Fix Maintainers.md formatting (NFC)
[llvm-project.git] / flang / test / Driver / func-attr.f90
blob7442ac54dcaa5aac98a0a65e327ae69bece36cb2
1 ! Test that -mframe-pointer can accept only specific values and when given an invalid value, check it raises an error.
3 ! REQUIRES: aarch64-registered-target
5 ! RUN: %flang_fc1 -triple aarch64-none-none -mframe-pointer=none -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefix=CHECK-NONEFP
6 ! RUN: %flang_fc1 -triple aarch64-none-none -mframe-pointer=non-leaf -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefix=CHECK-NONLEAFFP
7 ! RUN: %flang_fc1 -triple aarch64-none-none -mframe-pointer=all -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefix=CHECK-ALLFP
8 ! RUN: not %flang_fc1 -triple aarch64-none-none -mframe-pointer=wrongval -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefix=CHECK-WRONGVALUEFP
10 ! CHECK-NONEFP-LABEL: @func_() {
12 ! CHECK-NONLEAFFP-LABEL: @func_()
13 ! CHECK-NONLEAFFP-SAME: #0
15 ! CHECK-ALLFP-LABEL: @func_()
16 ! CHECK-ALLFP-SAME: #0
18 subroutine func
19 end subroutine func
21 ! CHECK-NONEFP-NOT: attributes #0 = { "frame-pointer"="{{.*}}" }
22 ! CHECK-NONLEAFFP: attributes #0 = { "frame-pointer"="non-leaf" }
23 ! CHECK-ALLFP: attributes #0 = { "frame-pointer"="all" }
25 ! CHECK-WRONGVALUEFP:error: invalid value 'wrongval' in '-mframe-pointer=wrongval'