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