blob: 726d2ef122e1043531ee26a01072463cec1d4b57 [file] [log] [blame]
Eric Christopher3883e662011-07-26 22:17:02 +00001// RUN: %clang_cc1 -w -emit-llvm %s -O1 -o - | FileCheck %s
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 // CHECK: ret i32 123
12 return *f();
13}