blob: 85aa615205cfcf8011a692ff764d05ab959f6826 [file] [log] [blame]
Dan Gohman2d65d352009-08-25 15:38:29 +00001// RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002
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
10typedef struct {
11 short x;
12} foostruct;
13
14int foo(foostruct ic);
15
16void test() {
17 foostruct xqic;
18 foo(xqic);
19}
20
21