77// RUN: not %clang %s -S -o - -target aarch64-linux-gnu -mcpu=cortex-a72 -fptrauth-returns 2>&1 | FileCheck %s --check-prefix=FAIL
88// RUN: not %clang %s -S -o - -target aarch64-linux-gnu -mcpu=cortex-a72 -fptrauth-objc-isa 2>&1 | FileCheck %s --check-prefix=FAIL
99//
10- // RUN: %clang %s -S -o - -target aarch64-linux-gnu -mcpu=apple-a12 -mbranch-protection=pauthabi 2>&1 | FileCheck %s --check-prefix=PAUTH
10+ // Test that no error is generated if FEAT_PAUTH is supported:
11+ // RUN: %clang %s -S -o - -target aarch64-linux-gnu -mcpu=apple-a12 -mbranch-protection=pauthabi 2>&1 | FileCheck %s --check-prefix=PAUTH
12+ // RUN: %clang %s -S -o - -target aarch64-linux-gnu -march=armv8.3-a -mbranch-protection=pauthabi 2>&1 | FileCheck %s --check-prefix=PAUTH
13+ // RUN: %clang %s -S -o - -target aarch64-linux-gnu -march=armv9-a -mbranch-protection=pauthabi 2>&1 | FileCheck %s --check-prefix=PAUTH
14+ // RUN: %clang %s -S -o - -target aarch64-linux-gnu -march=armv8.2-a+pauth -mbranch-protection=pauthabi 2>&1 | FileCheck %s --check-prefix=PAUTH
1115
1216// Test that the following options are still gated on -fptrauth-calls.
1317// If they are not, in assertion builds they would fail at asm printing time:
1418//
15- // RUN: %clang %s -S -o - -target aarch64-linux-gnu -mcpu=cortex-a72 -fptrauth-init-fini
16- // RUN: %clang %s -S -o - -target aarch64-linux-gnu -mcpu=cortex-a72 -fptrauth-function-pointer-type-discrimination
17- // RUN: %clang %s -S -o - -target aarch64-linux-gnu -mcpu=cortex-a72 -fptrauth-vtable-pointer-address-discrimination
18- // RUN: %clang %s -S -o - -target aarch64-linux-gnu -mcpu=cortex-a72 -fptrauth-vtable-pointer-type-discrimination
19- // RUN: %clang %s -S -o - -target aarch64-linux-gnu -mcpu=cortex-a72 -fptrauth-block-descriptor-pointers -fblocks -DBLOCKS
19+ // RUN: %clang %s -S -o - -target aarch64-linux-gnu -mcpu=cortex-a72 -fptrauth-init-fini 2>&1 | FileCheck %s --check-prefix=WARN -DOPTION=-fptrauth-init-fini
20+ // RUN: %clang %s -S -o - -target aarch64-linux-gnu -mcpu=cortex-a72 -fptrauth-function-pointer-type-discrimination 2>&1 | FileCheck %s --check-prefix=WARN -DOPTION=-fptrauth-function-pointer-type-discrimination
21+ // RUN: %clang %s -S -o - -target aarch64-linux-gnu -mcpu=cortex-a72 -fptrauth-vtable-pointer-address-discrimination 2>&1 | FileCheck %s --check-prefix=WARN -DOPTION=-fptrauth-vtable-pointer-address-discrimination
22+ // RUN: %clang %s -S -o - -target aarch64-linux-gnu -mcpu=cortex-a72 -fptrauth-vtable-pointer-type-discrimination 2>&1 | FileCheck %s --check-prefix=WARN -DOPTION=-fptrauth-vtable-pointer-type-discrimination
23+ // RUN: %clang %s -S -o - -target aarch64-linux-gnu -mcpu=cortex-a72 -fptrauth-block-descriptor-pointers -fblocks -DBLOCKS 2>&1 | FileCheck %s --check-prefix=WARN -DOPTION=-fptrauth-block-descriptor-pointers
2024
2125// Test that v8.2-compatible code is generated, if possible:
2226//
@@ -45,7 +49,8 @@ int g(int (^bptr)(int)) {
4549// FIXME At now, the error message is printed twice.
4650// Ideally, this should be fixed, but it seems rather harmless.
4751//
48- // FAIL-COUNT-2: error: A feature is requested that needs CPU with Pointer Authentication support
52+ // FAIL-COUNT-2: error: neither FEAT_PAUTH nor -fptrauth-soft is enabled. Most of PAuth features are unavailable
53+ // WARN-COUNT-2: warning: [[OPTION]] is ignored because -fptrauth-calls is not specified
4954
5055// COMPAT: f:
5156// COMPAT: hint {{#25|#27}}
@@ -57,3 +62,7 @@ int g(int (^bptr)(int)) {
5762// PAUTH: paci{{[ab]}}sp
5863//
5964// PAUTH: reta{{[ab]}}
65+
66+ // Just check that some assembler output is printed.
67+ // WARN: f:
68+ // WARN: ret
0 commit comments