This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix RTL checking failure in dbxout_parms


The problem is visible on SPARC64:

FAIL: g++.dg/debug/pr16792.C -gstabs1 -O2 (internal compiler error)
FAIL: g++.dg/debug/pr16792.C -gstabs1 -O2 (test for excess errors)
[...]

dbxout_parms is passed a parameter whose DECL_RTL is a REG but whose 
DECL_INCOMING_RTL is a PARALLEL (because of left justification).  But
the code applies REGNO directly on the PARALLEL.

Fixed by fetching the inner REG, applied on the mainline as obvious.
(The fix is probably not as thorough as it could be but it's STABS...)


2008-09-25  Eric Botcazou  <ebotcazou@adacore.com>

	* dbxout.c (dbxout_parms): Fetch the inner REG inside a PARALLEL.


-- 
Eric Botcazou
Index: dbxout.c
===================================================================
--- dbxout.c	(revision 140628)
+++ dbxout.c	(working copy)
@@ -3376,6 +3376,8 @@ dbxout_parms (tree parms)
 	       was passed.  */
 	    if (REGNO (DECL_RTL (parms)) < FIRST_PSEUDO_REGISTER)
 	      best_rtl = DECL_RTL (parms);
+	    else if (GET_CODE (DECL_INCOMING_RTL (parms)) == PARALLEL)
+	      best_rtl = XEXP (XVECEXP (DECL_INCOMING_RTL (parms), 0, 0), 0);
 	    else
 	      best_rtl = DECL_INCOMING_RTL (parms);
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]