[Bug middle-end/57896] [4.8 Regression] ICE in expand_expr_real_2
ubizjak at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Feb 20 09:58:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57896
--- Comment #17 from Uroš Bizjak <ubizjak at gmail dot com> ---
Somehow we get old_size = 0 in gen_reg_rtx. It is calculated as:
int old_size = crtl->emit.regno_pointer_align_length;
Trivial patch that prevents this situation and fixes the problem. However, it
is not clear to me if crtl->emit.regno_pointer_align_length should start larger
than zero.
--cut here--
Index: emit-rtl.c
===================================================================
--- emit-rtl.c (revision 207935)
+++ emit-rtl.c (working copy)
@@ -903,6 +903,8 @@ gen_reg_rtx (enum machine_mode mode)
char *tmp;
rtx *new1;
+ if (old_size < 1)
+ old_size = 1;
tmp = XRESIZEVEC (char, crtl->emit.regno_pointer_align, old_size * 2);
memset (tmp + old_size, 0, old_size);
crtl->emit.regno_pointer_align = (unsigned char *) tmp;
--cut here--
More information about the Gcc-bugs
mailing list