re PR other/12315 (ICE using -p with functions returning structs)
authorAlan Modra <amodra@bigpond.net.au>
Sat, 1 Nov 2003 00:48:50 +0000 (00:48 +0000)
committerAlan Modra <amodra@gcc.gnu.org>
Sat, 1 Nov 2003 00:48:50 +0000 (11:18 +1030)
PR 12315
* final.c (profile_function): Allow for NULL svrtx.

From-SVN: r73165

gcc/ChangeLog
gcc/final.c

index 90e6b6e59d4a0c1e5adbd2eb03479cfd09586140..a4ca9c79e7dffd27842b7cb0b28f686bd6ce7370 100644 (file)
@@ -1,3 +1,8 @@
+2003-11-01  Alan Modra  <amodra@bigpond.net.au>
+
+       PR 12315
+       * final.c (profile_function): Allow for NULL svrtx.
+
 2003-10-31  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
        * pa.c (pa_select_section): Use new style declaration.
index 20ceff8b7c055ae3a1e44f44755c2f16b8e20447..f8750e98872f8109c526c289508f2f22d1bc24c3 100644 (file)
@@ -1437,7 +1437,7 @@ profile_function (FILE *file ATTRIBUTE_UNUSED)
   function_section (current_function_decl);
 
 #if defined(ASM_OUTPUT_REG_PUSH)
-  if (sval && GET_CODE (svrtx) == REG)
+  if (sval && svrtx != NULL_RTX && GET_CODE (svrtx) == REG)
     ASM_OUTPUT_REG_PUSH (file, REGNO (svrtx));
 #endif
 
@@ -1468,7 +1468,7 @@ profile_function (FILE *file ATTRIBUTE_UNUSED)
 #endif
 
 #if defined(ASM_OUTPUT_REG_PUSH)
-  if (sval && GET_CODE (svrtx) == REG)
+  if (sval && svrtx != NULL_RTX && GET_CODE (svrtx) == REG)
     ASM_OUTPUT_REG_POP (file, REGNO (svrtx));
 #endif
 }