]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
emit-rtl.c (set_decl_incoming_rtl): Check whether the 0th element of PARALLEL is...
authorJosef Zlomek <zlomekj@suse.cz>
Sat, 14 Feb 2004 18:45:41 +0000 (19:45 +0100)
committerJosef Zlomek <zlomek@gcc.gnu.org>
Sat, 14 Feb 2004 18:45:41 +0000 (18:45 +0000)
* emit-rtl.c (set_decl_incoming_rtl): Check whether the 0th element of
PARALLEL is NULL.

From-SVN: r77811

gcc/ChangeLog
gcc/emit-rtl.c

index db4ae6f15dd3f980a26ddda54a286b4597eb24a6..1971c2b9944b18b88c06e558f688b5972f79c6ad 100644 (file)
@@ -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.
index 76f292ce4b9bf5f7e2c58ae2b2268093c03b8ca8..2a142871445ca6d86b075e59c8fcf44d318524b3 100644 (file)
@@ -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)))