[Bug ipa/58345] ICE with SIGFPE at -O1 on x86_64-linux-gnu (affecting trunk and 4.8)
mikpe at it dot uu.se
gcc-bugzilla@gcc.gnu.org
Sun Sep 8 08:04:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58345
Mikael Pettersson <mikpe at it dot uu.se> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikpe at it dot uu.se
--- Comment #1 from Mikael Pettersson <mikpe at it dot uu.se> ---
I can reproduce with 4.8 and trunk. Crashes due to division by zero in
fold_array_ctor_reference:
/* And offset within the access. */
inner_offset = offset % (elt_size.to_uhwi () * BITS_PER_UNIT);
Program received signal SIGFPE, Arithmetic exception.
0x00000000005e2448 in fold_array_ctor_reference (ctor=0x7ffff7627ca8,
ctor=0x7ffff7627ca8, from_decl=0x7ffff7535be0, size=0, offset=0,
type=0x7ffff7645540)
at /mnt/scratch/gcc-4.9-20130901/gcc/gimple-fold.c:2816
2816 inner_offset = offset % (elt_size.to_uhwi () * BITS_PER_UNIT);
(gdb) print elt_size
$1 = {low = 0, high = 0}
(gdb) q
Note that the test case has a static array of an empty struct type.
More information about the Gcc-bugs
mailing list