Tanya Lattner | e9af5d1 | 2004-11-06 22:41:00 +0000 | [diff] [blame] | 1 | // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null |
| 2 | |
Chris Lattner | 696bcf3 | 2002-08-19 21:48:09 +0000 | [diff] [blame] | 3 | /* This testcase doesn't actually test a bug, it's just the result of me |
| 4 | * figuring out the syntax for forward declaring a static variable. */ |
| 5 | struct list { |
| 6 | int x; |
| 7 | struct list *Next; |
| 8 | }; |
| 9 | |
| 10 | static struct list B; /* Forward declare static */ |
| 11 | static struct list A = { 7, &B }; |
| 12 | static struct list B = { 8, &A }; |
| 13 | |
| 14 | extern struct list D; /* forward declare normal var */ |
| 15 | |
| 16 | struct list C = { 7, &D }; |
| 17 | struct list D = { 8, &C }; |
| 18 | |