http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57896

--- Comment #27 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Jakub Jelinek from comment #25)
> Created attachment 32180 [details]
> gcc48-pr57896.patch
> 
> So like this (4.8 version, untested)?  Uros, can you please double-check it?
> The point is, if d->testing_p is true, we should do as few work as possible,
> certainly not call any emit_insn or gen_reg_rtx, and as soon as we know
> we'll certainly eventually return true, return it.

I have started bootstrap/regtest on 4.8 branch, together with following patch:

--cut here--
Index: emit-rtl.c
===================================================================
--- emit-rtl.c  (revision 207935)
+++ emit-rtl.c  (working copy)
@@ -894,6 +894,9 @@ gen_reg_rtx (enum machine_mode mode)
       return gen_rtx_CONCAT (mode, realpart, imagpart);
     }

+  /* Do not call gen_reg_rtx with uninitialized crtl.  */
+  gcc_assert (crtl->emit.regno_pointer_align_length);
+
   /* Make sure regno_pointer_align, and regno_reg_rtx are large
      enough to have an element for this pseudo reg number.  */

--cut here--

I will propose this patch for mainline, hopefully to save someone from
debugging this nasty data corruption.

Reply via email to