mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 13:11:39 +01:00
New test
llvm-svn: 3207
This commit is contained in:
parent
b4527d9165
commit
4749976f52
17
test/Regression/CFrontend/2002-08-02-UnionTest.c
Normal file
17
test/Regression/CFrontend/2002-08-02-UnionTest.c
Normal file
@ -0,0 +1,17 @@
|
||||
/* In this testcase, the return value of foo() is being promotedto a register
|
||||
* which breaks stuff
|
||||
*/
|
||||
#include <stdio.h>
|
||||
|
||||
union X { char X; void *B; int a, b, c, d;};
|
||||
|
||||
union X foo() {
|
||||
union X Global;
|
||||
Global.B = (void*)123; /* Interesting part */
|
||||
return Global;
|
||||
}
|
||||
|
||||
void main() {
|
||||
union X test = foo();
|
||||
printf("0x%p", test.B);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user