| // RUN: %clang_cc1 -emit-llvm -o %t %s |
| // RUN: grep '@r = common global \[1 x .*\] zeroinitializer' %t |
| // RUN: grep '@x = common global .struct.s0 zeroinitializer' %t |
| // RUN: grep '@y = common global .struct.s0 zeroinitializer' %t |
| // RUN: grep '@b = common global \[1 x .*\] zeroinitializer' %t |
| // Check that the most recent tentative definition wins. |
| // RUN: grep '@c = common global \[4 x .*\] zeroinitializer' %t |
| // Check that we emit static tentative definitions |
| // RUN: grep '@c5 = internal global \[1 x .*\] zeroinitializer' %t |
| static int func() { return c5[0]; } |
| int callfunc() { return func(); } |