blob: 53379482cb4d31e285cc35df56bb239f1e8a8697 [file] [log] [blame]
Duncan Sandsab6b2262009-03-20 21:53:29 +00001// RUN: %llvmgcc -S %s -O1 -o - | grep {ret.*123}
2// Check for bug compatibility with gcc.
3
4const int x __attribute((weak)) = 123;
5
6int* f(void) {
7 return &x;
8}
9
10int g(void) {
11 return *f();
12}