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
libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
pr51628-18.c
blob
03a04eff75cc29b24939a5eff91219330c73a26f
1
/* PR c/51628. */
2
/* { dg-do compile } */
3
/* { dg-options "-O" } */
4
5
void
foo
(
int
*);
6
7
int
*
8
bar
(
int
n
,
int
k
,
void
*
ptr
)
9
{
10
struct
A
11
{
12
int
c
[
k
];
13
int
x
[
n
];
14
}
__attribute__
((
packed
,
aligned
(
4
)));
15
struct
A
*
p
= (
struct
A
*)
ptr
;
16
17
int
*
p0
, *
p1
;
18
p0
=
p
->
x
;
19
foo
(
p0
);
20
p1
= &
p
->
x
[
1
];
21
foo
(
p1
);
22
return
&
p
->
x
[
1
];
23
}