Dan Gohman | fea1dd0 | 2009-08-25 15:38:29 +0000 | [diff] [blame] | 1 | // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null |
Tanya Lattner | e9af5d1 | 2004-11-06 22:41:00 +0000 | [diff] [blame] | 2 | |
Chris Lattner | 7e9ee75 | 2002-05-23 20:58:45 +0000 | [diff] [blame] | 3 | /* Make sure the frontend is correctly marking static stuff as internal! */ |
| 4 | |
| 5 | int X; |
| 6 | static int Y = 12; |
| 7 | |
| 8 | static void foo(int Z) { |
| 9 | Y = Z; |
| 10 | } |
| 11 | |
| 12 | void *test() { |
Jeff Cohen | b02fbfc | 2005-04-23 21:26:11 +0000 | [diff] [blame] | 13 | foo(12); |
| 14 | return &Y; |
Chris Lattner | 7e9ee75 | 2002-05-23 20:58:45 +0000 | [diff] [blame] | 15 | } |