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 warning with -Wsign-compare -Wsystem-headers
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
tree-ssa
/
pr45144.c
blob
e799039b631314c90b2ff032925dc95d01ef9402
1
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-optimized" } */
3
/* { dg-require-effective-target int32plus } */
4
5
void
baz
(
unsigned
);
6
7
extern
unsigned
buf
[];
8
9
struct
A
10
{
11
unsigned
a1
:
10
;
12
unsigned
a2
:
3
;
13
unsigned
:
19
;
14
};
15
16
union
TMP
17
{
18
struct
A a
;
19
unsigned int
b
;
20
};
21
22
static unsigned
23
foo
(
struct
A
*
p
)
24
{
25
union
TMP t
;
26
struct
A x
;
27
28
x
= *
p
;
29
t
.
a
=
x
;
30
return
t
.
b
;
31
}
32
33
void
34
bar
(
unsigned
orig
,
unsigned
*
new
)
35
{
36
struct
A a
;
37
union
TMP s
;
38
39
s
.
b
=
orig
;
40
a
=
s
.
a
;
41
if
(
a
.
a1
)
42
baz
(
a
.
a2
);
43
*
new
=
foo
(&
a
);
44
}
45
46
/* { dg-final { scan-tree-dump-not "unnamed-unsigned:19" "optimized"} } */