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
* expmed.c (flip_storage_order): Deal with complex modes specially.
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
bitfld-6.c
blob
d54a7376017ba89692b8514b51dccc0d61c6a67a
1
/* { dg-skip-if "requires default endianness" { *-*-* } "-fsso-struct=*" "" } */
2
3
union
U
4
{
5
const int
a
;
6
unsigned
b
:
20
;
7
};
8
9
static union
U u
= {
0x12345678
};
10
11
/* Constant folding used to fail to account for endianness when folding a
12
union. */
13
14
int
15
main
(
void
)
16
{
17
#ifdef __BYTE_ORDER__
18
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
19
return
u
.
b
-
0x45678
;
20
#else
21
return
u
.
b
-
0x12345
;
22
#endif
23
#endif
24
return
0
;
25
}