aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosef Zlomek <zlomekj@suse.cz>2004-02-14 19:45:41 +0100
committerJosef Zlomek <zlomek@gcc.gnu.org>2004-02-14 18:45:41 +0000
commitd4afac5bbd0dc69a47c800b0ad4ba3e469c48963 (patch)
treefa1b6177c06575af2d926341e2c6591f7db0f966
parent19b17484d033b444106949396c6d6abbe08d595f (diff)
downloadgcc-d4afac5bbd0dc69a47c800b0ad4ba3e469c48963.zip
gcc-d4afac5bbd0dc69a47c800b0ad4ba3e469c48963.tar.gz
gcc-d4afac5bbd0dc69a47c800b0ad4ba3e469c48963.tar.bz2
emit-rtl.c (set_decl_incoming_rtl): Check whether the 0th element of PARALLEL is NULL.
* emit-rtl.c (set_decl_incoming_rtl): Check whether the 0th element of PARALLEL is NULL. From-SVN: r77811
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/emit-rtl.c12
2 files changed, 15 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index db4ae6f..1971c2b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2004-02-14 Josef Zlomek <zlomekj@suse.cz>
+
+ * emit-rtl.c (set_decl_incoming_rtl): Check whether the 0th element of
+ PARALLEL is NULL.
+
2004-02-14 Per Bothner <per@bothner.com>
* fix-header.c (line_table): Move local variable in main to global.
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 76f292c..2a14287 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -852,8 +852,16 @@ set_decl_incoming_rtl (tree t, rtx x)
}
if (GET_CODE (x) == PARALLEL)
{
- int i;
- for (i = 0; i < XVECLEN (x, 0); i++)
+ int i, start;
+
+ /* Check for a NULL entry, used to indicate that the parameter goes
+ both on the stack and in registers. */
+ if (XEXP (XVECEXP (x, 0, 0), 0))
+ start = 0;
+ else
+ start = 1;
+
+ for (i = start; i < XVECLEN (x, 0); i++)
{
rtx y = XVECEXP (x, 0, i);
if (REG_P (XEXP (y, 0)))