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
Fix couple of endianness issues in fold_ctor_reference
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
20230630-1.c
blob
7c1f15c177f055dfd1ee986d5932241b745abf5b
1
struct
S
{
2
short int
i
:
12
;
3
char
c1
:
1
;
4
char
c2
:
1
;
5
char
c3
:
1
;
6
char
c4
:
1
;
7
};
8
9
int
main
(
void
)
10
{
11
struct
S s0
= {
341
,
1
,
1
,
1
,
1
};
12
char
*
p
= (
char
*) &
s0
;
13
14
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
15
if
(*
p
!=
85
)
16
__builtin_abort
();
17
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
18
if
(*
p
!=
21
)
19
__builtin_abort
();
20
#endif
21
22
return
0
;
23
}