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
PR inline-asm/84742
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
20020619-1.c
blob
1a1503e8930af5e0d8db9e60ef2979d49c11e9f5
1
#if (__SIZEOF_INT__ == 4)
2
typedef
int
int32
;
3
#elif (__SIZEOF_LONG__ == 4)
4
typedef
long
int32
;
5
#else
6
#error Add target support for int32
7
#endif
8
static
int32
ref
(
void
)
9
{
10
union
{
11
char
c
[
5
];
12
int32 i
;
13
}
u
;
14
15
__builtin_memset
(&
u
,
0
,
sizeof
(
u
));
16
u
.
c
[
0
] =
1
;
17
u
.
c
[
1
] =
2
;
18
u
.
c
[
2
] =
3
;
19
u
.
c
[
3
] =
4
;
20
21
return
u
.
i
;
22
}
23
24
int
main
()
25
{
26
int32 b
=
ref
();
27
if
(
b
!=
0x01020304
28
&&
b
!=
0x04030201
)
29
abort
();
30
return
0
;
31
}