blob: 4604f2f4297d972573ab6a97e148571cf8526514 [file] [log] [blame]
Daniel Dunbarf25d8a92009-04-15 22:08:45 +00001// RUN: clang-cc -emit-llvm -o %t %s &&
2
3// RUN: grep '@r = common global \[1 x .*\] zeroinitializer' %t &&
4
5int r[];
6int (*a)[] = &r;
7
8struct s0;
9struct s0 x;
10// RUN: grep '@x = common global .struct.s0 zeroinitializer' %t &&
11
12struct s0 y;
13// RUN: grep '@y = common global .struct.s0 zeroinitializer' %t &&
14struct s0 *f0() {
15 return &y;
16}
17
18struct s0 {
19 int x;
20};
21
22// RUN: grep '@b = common global \[1 x .*\] zeroinitializer' %t &&
23int b[];
24int *f1() {
25 return b;
26}
27
28// RUN: true