1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -emit-llvm %s -o /dev/null 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc /* This testcase doesn't actually test a bug, it's just the result of me 4*f4a2713aSLionel Sambuc * figuring out the syntax for forward declaring a static variable. */ 5*f4a2713aSLionel Sambuc struct list { 6*f4a2713aSLionel Sambuc int x; 7*f4a2713aSLionel Sambuc struct list *Next; 8*f4a2713aSLionel Sambuc }; 9*f4a2713aSLionel Sambuc 10*f4a2713aSLionel Sambuc static struct list B; /* Forward declare static */ 11*f4a2713aSLionel Sambuc static struct list A = { 7, &B }; 12*f4a2713aSLionel Sambuc static struct list B = { 8, &A }; 13*f4a2713aSLionel Sambuc 14*f4a2713aSLionel Sambuc extern struct list D; /* forward declare normal var */ 15*f4a2713aSLionel Sambuc 16*f4a2713aSLionel Sambuc struct list C = { 7, &D }; 17*f4a2713aSLionel Sambuc struct list D = { 8, &C }; 18*f4a2713aSLionel Sambuc 19