[Bug middle-end/33029] [4.3 Regression] libgcc2.c:1890: internal compiler error: in local_cprop_pass, at gcse.c:3236
--- Comment #14 from ian at gcc dot gnu dot org 2007-09-05 05:31 --- Subject: Bug 33029 Author: ian Date: Wed Sep 5 05:31:37 2007 New Revision: 128119 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=128119 Log: PR middle-end/33029 * lower-subreg.c (resolve_clobber): If we remove a REG_LIBCALL note, remove the associated REG_RETVAL note. Modified: trunk/gcc/ChangeLog trunk/gcc/lower-subreg.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33029
[Bug middle-end/33029] [4.3 Regression] libgcc2.c:1890: internal compiler error: in local_cprop_pass, at gcse.c:3236
--- Comment #15 from ian at airs dot com 2007-09-05 05:34 --- Fixed. -- ian at airs dot com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33029
[Bug middle-end/33029] [4.3 Regression] libgcc2.c:1890: internal compiler error: in local_cprop_pass, at gcse.c:3236
--- Comment #12 from debian-gcc at lists dot debian dot org 2007-08-31 17:24 --- a hppa-linux-gnu - hppa64-linux-gnu cross compiler builds with this patch. Matthias -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33029
[Bug middle-end/33029] [4.3 Regression] libgcc2.c:1890: internal compiler error: in local_cprop_pass, at gcse.c:3236
--- Comment #13 from danglin at gcc dot gnu dot org 2007-08-31 23:56 --- Ian, how are we going to fix this? Steven helpfully provided two solutions but he is no longer a maintainer. The second has been independently tested several times. I have also tested that reverting your change fixes the build failure on hppa64-hp-hpux11.11. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33029
[Bug middle-end/33029] [4.3 Regression] libgcc2.c:1890: internal compiler error: in local_cprop_pass, at gcse.c:3236
--- Comment #9 from pinskia at gcc dot gnu dot org 2007-08-29 22:14 --- *** Bug 33240 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added CC||debian-gcc at lists dot ||debian dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33029
[Bug middle-end/33029] [4.3 Regression] libgcc2.c:1890: internal compiler error: in local_cprop_pass, at gcse.c:3236
--- Comment #10 from pinskia at gcc dot gnu dot org 2007-08-29 22:14 --- Any news on this bug? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33029
[Bug middle-end/33029] [4.3 Regression] libgcc2.c:1890: internal compiler error: in local_cprop_pass, at gcse.c:3236
--- Comment #11 from dave at hiauly1 dot hia dot nrc dot ca 2007-08-30 01:43 --- Subject: Re: [4.3 Regression] libgcc2.c:1890: internal compiler error: in local_cprop_pass, at gcse.c:3236 Any news on this bug? I have been building with Steven's change for the past couple of weeks and haven't seen any new problems. Dave -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33029
[Bug middle-end/33029] [4.3 Regression] libgcc2.c:1890: internal compiler error: in local_cprop_pass, at gcse.c:3236
--- Comment #8 from andreast at gcc dot gnu dot org 2007-08-19 19:56 --- I can confirm the patch in comment 7 fixes the bootstrap failure here. Thanks! -- andreast at gcc dot gnu dot org changed: What|Removed |Added CC||andreast at gcc dot gnu dot ||org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33029
[Bug middle-end/33029] [4.3 Regression] libgcc2.c:1890: internal compiler error: in local_cprop_pass, at gcse.c:3236
--- Comment #5 from steven at gcc dot gnu dot org 2007-08-16 14:35 --- Starting program: /home/steven/devel/build-test/gcc/cc1 -g -O2 -fPIC -Dpa64=1 -mlong-calls -fkeep-inline-functions libgcc2.i __multc3 Analyzing compilation unit Performing interprocedural optimizations visibility early_local_cleanups inline static-var pure-const type-escape-varAssembling functions: __multc3 Breakpoint 1, fancy_abort (file=0xcdbc31 ../../trunk/gcc/gcse.c, line=3236, function=0xcdc050 local_cprop_pass) at ../../trunk/gcc/diagnostic.c:655 655 internal_error (in %s, at %s:%d, function, trim_filename (file), line); (gdb) up #1 0x006dcd3a in local_cprop_pass (alter_jumps=1 '\001') at ../../trunk/gcc/gcse.c:3236 3236 gcc_assert (libcall_sp == libcall_stack[MAX_NESTED_LIBCALLS]); (gdb) l 3231} 3232 3233 /* Forget everything at the end of a basic block. Make sure we are 3234 not inside a libcall, they should never cross basic blocks. */ 3235 cselib_clear_table (); 3236 gcc_assert (libcall_sp == libcall_stack[MAX_NESTED_LIBCALLS]); 3237} 3238 3239 cselib_finish (); 3240 (gdb) Definitely a problem with the nested libcalls handling. -- steven at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2007-08-16 14:35:32 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33029
[Bug middle-end/33029] [4.3 Regression] libgcc2.c:1890: internal compiler error: in local_cprop_pass, at gcse.c:3236
--- Comment #6 from steven at gcc dot gnu dot org 2007-08-16 14:54 --- Created an attachment (id=14064) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14064action=view) remove nested libcall handling from gcse.c This is the *only* place in the entire compiler where GCC handles nested libcalls. I've had this patch for a long time now, but no-one seemed to be interested much in doing something about libcall notes. Maybe someone wants to finish this patch now? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33029
[Bug middle-end/33029] [4.3 Regression] libgcc2.c:1890: internal compiler error: in local_cprop_pass, at gcse.c:3236
--- Comment #7 from steven at gcc dot gnu dot org 2007-08-16 15:05 --- Fix for the bug: Index: lower-subreg.c === --- lower-subreg.c (revision 127558) +++ lower-subreg.c (working copy) @@ -897,7 +897,7 @@ resolve_simple_move (rtx set, rtx insn) static bool resolve_clobber (rtx pat, rtx insn) { - rtx reg; + rtx reg, note; enum machine_mode orig_mode; unsigned int words, i; int ret; @@ -909,8 +909,11 @@ resolve_clobber (rtx pat, rtx insn) /* If this clobber has a REG_LIBCALL note, then it is the initial clobber added by emit_no_conflict_block. We were able to decompose the register, so we no longer need the clobber. */ - if (find_reg_note (insn, REG_LIBCALL, NULL_RTX) != NULL_RTX) + note = find_reg_note (insn, REG_LIBCALL, NULL_RTX); + if (note != NULL_RTX) { + rtx retval_insn = XEXP (note, 0); + remove_retval_note (retval_insn); delete_insn (insn); return true; } In case someone cares enough to fix this properly: GCC should probably also remove the REG_LIBCALL_ID notes of all the insns in the libcall chain -- but we don't do that anywhere else right now and the above patch is sufficient to avoid the ICE. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33029
[Bug middle-end/33029] [4.3 Regression] libgcc2.c:1890: internal compiler error: in local_cprop_pass, at gcse.c:3236
--- Comment #3 from andreast at gcc dot gnu dot org 2007-08-14 21:22 --- Created an attachment (id=14060) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14060action=view) preprocessed source Added preprocessed source. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33029
[Bug middle-end/33029] [4.3 Regression] libgcc2.c:1890: internal compiler error: in local_cprop_pass, at gcse.c:3236
--- Comment #4 from steven at gcc dot gnu dot org 2007-08-14 21:34 --- r127273 is this patch: http://gcc.gnu.org/ml/gcc-cvs/2007-08/msg00165.html My initial reaction was, What happens to the REG_RETVAL note, if the insn with the REG_LIBCALL note? I don't know what happens with the REG_LIBCALL note, but if it disappears with the insn that's being deleted, then you should also remove the REG_RETVAL note, or you're creating something that will look like nested libcalls (which gcse.c handles, but they're actually not allowed). So, can you check what happens with the REG_RETVAL note, please? -- steven at gcc dot gnu dot org changed: What|Removed |Added CC||steven at gcc dot gnu dot ||org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33029
[Bug middle-end/33029] [4.3 Regression] libgcc2.c:1890: internal compiler error: in local_cprop_pass, at gcse.c:3236
-- pinskia at gcc dot gnu dot org changed: What|Removed |Added CC||pinskia at gcc dot gnu dot ||org Keywords||build, ice-on-valid-code Summary|libgcc2.c:1890: internal|[4.3 Regression] |compiler error: in local_cpr|libgcc2.c:1890: internal |op_pass, at gcse.c:3236 |compiler error: in ||local_cprop_pass, at ||gcse.c:3236 Target Milestone|--- |4.3.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33029
[Bug middle-end/33029] [4.3 Regression] libgcc2.c:1890: internal compiler error: in local_cprop_pass, at gcse.c:3236
-- mmitchel at gcc dot gnu dot org changed: What|Removed |Added Priority|P3 |P1 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33029
[Bug middle-end/33029] [4.3 Regression] libgcc2.c:1890: internal compiler error: in local_cprop_pass, at gcse.c:3236
--- Comment #2 from danglin at gcc dot gnu dot org 2007-08-10 04:02 --- This was introduced in revision 127273. -- danglin at gcc dot gnu dot org changed: What|Removed |Added CC||ian at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33029