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 | efa4ec0 | 2002-02-14 00:18:44 +0000 | [diff] [blame] | 3 | /* Testcase for a problem where GCC allocated xqic to a register, |
| 4 | * and did not have a VAR_DECL that explained the stack slot to LLVM. |
| 5 | * Now the LLVM code synthesizes a stack slot if one is presented that |
| 6 | * has not been previously recognized. This is where alloca's named |
| 7 | * 'local' come from now. |
| 8 | */ |
| 9 | |
| 10 | typedef struct { |
| 11 | short x; |
| 12 | } foostruct; |
| 13 | |
| 14 | int foo(foostruct ic); |
| 15 | |
| 16 | void test() { |
| 17 | foostruct xqic; |
| 18 | foo(xqic); |
| 19 | } |
| 20 | |
| 21 | |