From d4afac5bbd0dc69a47c800b0ad4ba3e469c48963 Mon Sep 17 00:00:00 2001 From: Josef Zlomek Date: Sat, 14 Feb 2004 19:45:41 +0100 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/emit-rtl.c | 12 ++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index db4ae6f15dd..1971c2b9944 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-02-14 Josef Zlomek + + * emit-rtl.c (set_decl_incoming_rtl): Check whether the 0th element of + PARALLEL is NULL. + 2004-02-14 Per Bothner * 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 76f292ce4b9..2a142871445 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))) -- 2.30.2