Eric Christopher | 3883e66 | 2011-07-26 22:17:02 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -w -emit-llvm %s -O1 -o - | FileCheck %s |
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 | // CHECK: ret i32 123 | ||||
12 | return *f(); | ||||
13 | } |