Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / cfi / icall / weak.c
blob40739911109c8d51d600a3b9e2847088b54da884
1 // Test that weak symbols stay weak.
2 // RUN: %clang_cfi -lm -o %t1 %s && %t1
3 // XFAIL: darwin
5 __attribute__((weak)) void does_not_exist(void);
7 __attribute__((noinline))
8 void foo(void (*p)(void)) {
9 p();
12 int main(int argc, char **argv) {
13 if (does_not_exist)
14 foo(does_not_exist);