3 // RUN: %clangxx_cfi -o %t1 %s
4 // RUN: %expect_crash %run %t1 2>&1 | FileCheck --check-prefix=CFI %s
6 // RUN: %clangxx_cfi -DB32 -o %t2 %s
7 // RUN: %expect_crash %run %t2 2>&1 | FileCheck --check-prefix=CFI %s
9 // RUN: %clangxx_cfi -DB64 -o %t3 %s
10 // RUN: %expect_crash %run %t3 2>&1 | FileCheck --check-prefix=CFI %s
12 // RUN: %clangxx_cfi -DBM -o %t4 %s
13 // RUN: %expect_crash %run %t4 2>&1 | FileCheck --check-prefix=CFI %s
15 // RUN: %clangxx -o %t5 %s
16 // RUN: %run %t5 2>&1 | FileCheck --check-prefix=NCFI %s
18 // Tests that the CFI enforcement distinguishes between non-overriding siblings.
19 // XFAILed as not implemented yet.
43 break_optimization(b
);
47 fprintf(stderr
, "1\n");
49 ((C
*)b
)->f(); // UB here
53 fprintf(stderr
, "2\n");