repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
* gcc.dg/const-elim-1.c: xfail for xtensa.
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
compat
/
struct-align.c
blob
69fe6b335ca06d778487848eb5aea6651e1fba3f
1
typedef
union
2
{
3
struct
{
int
a
;
int
b
;}
s
;
4
double
d
;
5
}
T
;
6
7
int
h
(
T
*);
8
T
g
(
T
);
9
10
#if COMPILER != 1
11
h
(
T
*
x
)
12
{
13
if
(
x
->
s
.
a
!=
0
||
x
->
s
.
b
!=
1
)
14
abort
();
15
}
16
#endif
17
18
#if COMPILER != 2
19
T
20
g
(
T x
)
21
{
22
if
(
x
.
s
.
a
!=
13
||
x
.
s
.
b
!=
47
)
23
abort
();
24
x
.
s
.
a
=
0
;
25
x
.
s
.
b
=
1
;
26
h
(&
x
);
27
return
x
;
28
}
29
#endif
30
31
#if COMPILER != 1
32
f
()
33
{
34
T x
;
35
x
.
s
.
a
=
13
;
36
x
.
s
.
b
=
47
;
37
g
(
x
);
38
if
(
x
.
s
.
a
!=
13
||
x
.
s
.
b
!=
47
)
39
abort
();
40
x
=
g
(
x
);
41
if
(
x
.
s
.
a
!=
0
||
x
.
s
.
b
!=
1
)
42
abort
();
43
}
44
#endif
45
46
#if COMPILER != 2
47
main
()
48
{
49
f
();
50
exit
(
0
);
51
}
52
#endif