blob: b9e2c2e0506f974e432af3b29152c664ed81d740 [file] [log] [blame]
Tanya Lattnere9af5d12004-11-06 22:41:00 +00001// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
2
Chris Lattner20f15aa2002-08-02 16:26:08 +00003/* In this testcase, the return value of foo() is being promotedto a register
4 * which breaks stuff
5 */
6#include <stdio.h>
7
8union X { char X; void *B; int a, b, c, d;};
9
10union X foo() {
11 union X Global;
12 Global.B = (void*)123; /* Interesting part */
13 return Global;
14}
15
16void main() {
17 union X test = foo();
18 printf("0x%p", test.B);
19}