After vta merge, gfortran.dg/loc_2.f90 fails on sh4-unknown-linux-gnu for -O3 -g with loc_2.f90:114:0: internal compiler error: in reload_combine_note_use, at postreload.c:1097 which is the result of postreload.c: 1097 gcc_assert (regno < FIRST_PSEUDO_REGISTER); The problematic regno 1434 came from a debug insn (debug_insn 1346 1344 1350 3 loc_2.f90:46 (var_location:SI offset (reg:SI 1434 [ ivtmp.132 ])) -1 (nil)) which looks orphaned at postreload pass. There are no other insns referring to reg 1434 at that pass.
Debug insns are always "orphaned".
Ah, then it seems that reload_combine_note_use or its caller should take account of debug insns.
I get the same ICE during a 32-bit bootstrap of powerpc64-linux or powerpc-linux. I'll attach a minimized testcase that shows the error when compiled with cc1 for powerpc-linux. A 64-bit bootstrap doesn't run into this problem.
Created attachment 18549 [details] minimized testcase cc1 for powerpc-linux gets the ICE when compiling this testcase using -O1 -g.
Didn't mean to change the component when CC'ing myself, changing back.
Subject: Bug 41295 Author: aoliva Date: Tue Sep 22 18:31:26 2009 New Revision: 152040 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152040 Log: gcc/ChangeLog: PR debug/41295 * reload1.c (reload): Reset debug insns with pseudos without equivalences. gcc/testsuite/ChangeLog: PR debug/41295 * gcc.dg/pr41295.c: New. Added: trunk/gcc/testsuite/gcc.dg/pr41295.c Modified: trunk/gcc/ChangeLog trunk/gcc/reload1.c trunk/gcc/testsuite/ChangeLog
Fixed.
Subject: Bug 41295 Author: hjl Date: Mon Sep 28 20:38:53 2009 New Revision: 152250 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152250 Log: 2009-09-28 H.J. Lu <hongjiu.lu@intel.com> Backport from mainline: 2009-09-26 Andreas Schwab <schwab@linux-m68k.org> PR c/41476 * gcc.dg/cond-constqual-1.c: New test. 2009-09-26 Michael Matz <matz@suse.de> PR lto/40758 PR middle-end/41470 * gcc.dg/pr41470.c: New test. 2009-09-23 Alexandre Oliva <aoliva@redhat.com> PR debug/41248 * gcc.dg/pr41248.c: New. 2009-09-22 Alexandre Oliva <aoliva@redhat.com> PR debug/41295 * gcc.dg/pr41295.c: New. 2009-09-20 Andrew Pinski <pinskia@gcc.gnu.org> PR middle-end/40642 * g++.dg/torture/pr40642.C: New testcase. 2009-09-17 Michael Matz <matz@suse.de> PR middle-end/41347 * gfortran.dg/pr41347.f90: New test. 2009-09-16 Michael Matz <matz@suse.de> PR fortran/41212 * gfortran.dg/pr41212.f90: New test. 2009-09-11 Michael Matz <matz@suse.de> PR middle-end/41275 * g++.dg/tree-ssa/pr41275.C: New test. 2009-09-11 Janus Weil <janus@gcc.gnu.org> PR fortran/41242 * gfortran.dg/proc_ptr_comp_21.f90: New. Added: branches/gcc-4_4-branch/gcc/testsuite/g++.dg/torture/pr40642.C - copied unchanged from r152249, trunk/gcc/testsuite/g++.dg/torture/pr40642.C branches/gcc-4_4-branch/gcc/testsuite/g++.dg/tree-ssa/pr41275.C - copied unchanged from r152249, trunk/gcc/testsuite/g++.dg/tree-ssa/pr41275.C branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/cond-constqual-1.c - copied unchanged from r152248, trunk/gcc/testsuite/gcc.dg/cond-constqual-1.c branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/pr41248.c - copied unchanged from r152248, trunk/gcc/testsuite/gcc.dg/pr41248.c branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/pr41295.c - copied unchanged from r152249, trunk/gcc/testsuite/gcc.dg/pr41295.c branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/pr41470.c - copied unchanged from r152248, trunk/gcc/testsuite/gcc.dg/pr41470.c branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/pr41212.f90 - copied unchanged from r152249, trunk/gcc/testsuite/gfortran.dg/pr41212.f90 branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/pr41347.f90 - copied unchanged from r152249, trunk/gcc/testsuite/gfortran.dg/pr41347.f90 branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/proc_ptr_comp_21.f90 - copied unchanged from r152249, trunk/gcc/testsuite/gfortran.dg/proc_ptr_comp_21.f90 Modified: branches/gcc-4_4-branch/gcc/testsuite/ChangeLog