projects
/
gcc.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
cgraph: A COMDAT decl always has non-zero address.
[gcc.git]
/
gcc
/
testsuite
/
c-c++-common
/
pr51628-1.c
1
/* PR c/51628. */
2
/* { dg-do compile } */
3
/* { dg-options "-O" } */
4
5
struct
pair_t
6
{
7
int
x
;
8
int
i
;
9
}
__attribute__
((
packed
,
aligned
(
4
)));
10
11
extern
struct
pair_t p
;
12
extern
int
*
x
;
13
extern
void
bar
(
int
*);
14
15
int
*
addr
= &
p
.
i
;
16
17
int
*
18
foo
(
void
)
19
{
20
struct
pair_t arr
[
2
] = { {
1
,
10
}, {
2
,
20
} };
21
int
*
p0
, *
p1
;
22
p0
= &
arr
[
0
].
i
;
23
bar
(
p0
);
24
p1
= &
arr
[
1
].
i
;
25
bar
(
p1
);
26
bar
(&
p
.
i
);
27
x
= &
p
.
i
;
28
return
&
p
.
i
;
29
}