This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/54961] [4.8 Regression] FAIL: gfortran.dg/pr48757.f -O (internal compiler error) after revision 192440
- From: "steven at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 19 Oct 2012 21:57:54 +0000
- Subject: [Bug middle-end/54961] [4.8 Regression] FAIL: gfortran.dg/pr48757.f -O (internal compiler error) after revision 192440
- Auto-submitted: auto-generated
- References: <bug-54961-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54961
--- Comment #2 from Steven Bosscher <steven at gcc dot gnu.org> 2012-10-19 21:57:54 UTC ---
Something I'm going to test:
Index: ira-lives.c
===================================================================
--- ira-lives.c (revision 192571)
+++ ira-lives.c (working copy)
@@ -1373,6 +1373,19 @@ process_bb_node_lives (ira_loop_tree_nod
if (bb_has_abnormal_pred (bb))
{
#ifdef STACK_REGS
+ /* Mark all stack mode registers and stack hard registers live
+ so that they will conflict and allocation across the abnormal
+ edge is impossible.
+ Stack registers must be treated as live in the traditional,
+ DF_LR-like sense, because compensation code may have to be
+ introduced on edges. The register allocator treats the stack
+ registers like all other, non-stack registers. It doesn't
+ know that stack shuffling may be required and may allocate
+ a partially available stack reg in ways that result in the
+ need for compensation code on abnormal edges. See PR54961. */
+ EXECUTE_IF_SET_IN_BITMAP (DF_LR_IN (bb), FIRST_PSEUDO_REGISTER, j,
bi)
+ if (IS_STACK_MODE (GET_MODE (regno_reg_rtx[j])))
+ mark_pseudo_regno_live (j);
EXECUTE_IF_SET_IN_SPARSESET (objects_live, px)
{
ira_allocno_t a = OBJECT_ALLOCNO (ira_object_id_map[px]);