From: Josef Zlomek Date: Sat, 14 Feb 2004 18:45:41 +0000 (+0100) Subject: emit-rtl.c (set_decl_incoming_rtl): Check whether the 0th element of PARALLEL is... X-Git-Tag: releases/gcc-4.0.0~10119 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d4afac5bbd0dc69a47c800b0ad4ba3e469c48963;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index db4ae6f15dd3..1971c2b9944b 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 76f292ce4b9b..2a142871445c 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)))