gcc/testsuite/g++.target/arm/bti_thunk.C
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-require-effective-target arm_arch_v8_1m_main_pacbti_ok } */ |
| 3 | /* { dg-add-options arm_arch_v8_1m_main_pacbti } */ |
| 4 | /* { dg-additional-options "-mbranch-protection=bti" }*/ |
| 5 | |
| 6 | #include <stdio.h> |
| 7 | |
| 8 | struct C18 { |
| 9 | virtual void f7(); |
| 10 | }; |
| 11 | |
| 12 | struct C19 : virtual C18 { |
| 13 | virtual void f7(); |
| 14 | }; |
| 15 | |
| 16 | void C19::f7() { |
| 17 | printf("foo\n"); |
| 18 | } |
| 19 | |
| 20 | /* { dg-final { scan-assembler-times "\tbti" 2 } } */ |