[Bug rtl-optimization/61657] Undefined behavior in loop-iv.c
zeccav at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Aug 21 11:17:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61657
--- Comment #6 from Vittorio Zecca <zeccav at gmail dot com> ---
A shorter source file displaying the same bug:
// from pr42049.c
// gcc -funroll-loops -O
// ../../gcc-5.2.0/gcc/loop-iv.c:2670:14: runtime error:
// signed integer overflow: 7 - -9223372036854775808 cannot be represented in
type 'long int'
// loop-iv.c source line "max = (uint64_t) (up - down) / inc + 1;"
// Target: x86_64-unknown-linux-gnu
// COLLECT_GCC_OPTIONS='-funroll-loops' '-O' '-mtune=generic' '-march=x86-64'
void
foo (void)
{
long int i;
for (i = 1; i && i < 8; i++);
}
More information about the Gcc-bugs
mailing list