Compiler flags: $ g++ -O1 -fsched-pressure -funroll-loops -fschedule-insns -fcompare-debug testcase.C Tested revisions: r159305 - fail r159045 - fail r158095 - fail r153685 - OK
Created attachment 20689 [details] reduced testcase $ /mnt/svn/gcc-trunk/binary-159305-lto-fortran/bin/g++ -O1 -fgcse -fsched-pressure -funroll-loops -fschedule-insns -fcompare-debug pr44178.C g++: pr44178.C: -fcompare-debug failure
Created attachment 20700 [details] gcc46-pr44178.patch Untested fix.
Subject: Bug 44178 Author: jakub Date: Thu May 20 16:34:43 2010 New Revision: 159632 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=159632 Log: PR debug/44178 * haifa-sched.c (initiate_bb_reg_pressure_info): Do not call setup_ref_regs for DEBUG_INSNs. * g++.dg/debug/pr44178.C: New test. Added: trunk/gcc/testsuite/g++.dg/debug/pr44178.C Modified: trunk/gcc/ChangeLog trunk/gcc/haifa-sched.c trunk/gcc/testsuite/ChangeLog
Subject: Bug 44178 Author: jakub Date: Thu May 20 16:58:52 2010 New Revision: 159634 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=159634 Log: PR debug/44178 * haifa-sched.c (initiate_bb_reg_pressure_info): Do not call setup_ref_regs for DEBUG_INSNs. * g++.dg/debug/pr44178.C: New test. Added: branches/gcc-4_5-branch/gcc/testsuite/g++.dg/debug/pr44178.C Modified: branches/gcc-4_5-branch/gcc/ChangeLog branches/gcc-4_5-branch/gcc/haifa-sched.c branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
Fixed.
The testcase doesn't pass on 4.5 branch with RTL checking: /home/eric/gnat/gnat6_45/src/gcc/testsuite/g++.dg/debug/pr44178.C:39:1: internal compiler error: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in setup_insn_max_reg_pressure, at haifa-sched.c:1589 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. compiler exited with status 1
That's because of PR43332, which has been fixed just on the trunk, not on 4.5 branch.
Fully fixed.