xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/PR3613-static-decl.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -o %t %s
2*f4a2713aSLionel Sambuc // RUN: grep '@g0 = internal global %.truct.s0 { i32 3 }' %t | count 1
3*f4a2713aSLionel Sambuc 
4*f4a2713aSLionel Sambuc struct s0 {
5*f4a2713aSLionel Sambuc   int a;
6*f4a2713aSLionel Sambuc };
7*f4a2713aSLionel Sambuc 
8*f4a2713aSLionel Sambuc static struct s0 g0;
9*f4a2713aSLionel Sambuc 
f0(void)10*f4a2713aSLionel Sambuc static int f0(void) {
11*f4a2713aSLionel Sambuc   return g0.a;
12*f4a2713aSLionel Sambuc }
13*f4a2713aSLionel Sambuc 
14*f4a2713aSLionel Sambuc static struct s0 g0 = {3};
15*f4a2713aSLionel Sambuc 
16*f4a2713aSLionel Sambuc void *g1 = f0;
17