This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix RTL checking failure in dbxout_parms
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 25 Sep 2008 13:55:39 +0200
- Subject: 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);