Chris Lattner | 20f15aa | 2002-08-02 16:26:08 +0000 | [diff] [blame^] | 1 | /* In this testcase, the return value of foo() is being promotedto a register |
2 | * which breaks stuff | ||||
3 | */ | ||||
4 | #include <stdio.h> | ||||
5 | |||||
6 | union X { char X; void *B; int a, b, c, d;}; | ||||
7 | |||||
8 | union X foo() { | ||||
9 | union X Global; | ||||
10 | Global.B = (void*)123; /* Interesting part */ | ||||
11 | return Global; | ||||
12 | } | ||||
13 | |||||
14 | void main() { | ||||
15 | union X test = foo(); | ||||
16 | printf("0x%p", test.B); | ||||
17 | } |