Sign in
gnu
/
gcc
/
a6d3012b274f38b20e2a57162106f625746af6c6
/
.
/
gcc
/
testsuite
/
gcc.dg
/
pr45991.c
blob: eefce4429e1b1360729cb424a9358adb64d83743 [
file
] [
log
] [
blame
]
/* { dg-do compile } */
/* { dg-options "-O -fstrict-overflow" } */
struct
S
{
int
i
;
};
char
A
[
64
];
void
foo
(
char
**
dst
,
int
i
)
{
char
*
p
=
A
+
16
;
while
(
i
--)
{
int
b
=
((
struct
S
*)
(&
p
[
i
*
16
+
4
]))->
i
;
char
*
c
=
A
+
i
*
16
;
dst
[
i
]
=
c
+
b
;
}
}