projects
/
platform
/
upstream
/
gcc48.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Imported Upstream version 4.8.1
[platform/upstream/gcc48.git]
/
gcc
/
testsuite
/
gcc.dg
/
pr53352.c
1
/* { dg-do run } */
2
/* { dg-options "-O1" } */
3
4
#include <stdlib.h>
5
6
typedef union
7
{
8
struct
9
{
10
unsigned char a;
11
unsigned char b;
12
unsigned char c;
13
unsigned char d;
14
} parts;
15
unsigned long whole;
16
} T;
17
18
T *g_t;
19
20
void bar (unsigned long x)
21
{
22
if (x != 0)
23
abort ();
24
}
25
26
int main ()
27
{
28
T one;
29
T two;
30
T tmp1, tmp2;
31
32
one.whole = 0xFFE0E0E0UL;
33
two.whole = 0xFF000000UL;
34
tmp1.parts = two.parts;
35
tmp2.parts = one.parts;
36
tmp2.parts.c = tmp1.parts.c;
37
one.parts = tmp2.parts;
38
39
g_t = &one;
40
bar (0);
41
return 0;
42
}