1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 22:12:57 +02:00
llvm-mirror/test/FrontendC/weak_constant.c

13 lines
194 B
C
Raw Normal View History

// RUN: %llvmgcc -S %s -O1 -o - | grep {ret.*123}
// Check for bug compatibility with gcc.
const int x __attribute((weak)) = 123;
int* f(void) {
return &x;
}
int g(void) {
return *f();
}