aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2003-11-01 00:48:50 +0000
committerAlan Modra <amodra@gcc.gnu.org>2003-11-01 11:18:50 +1030
commit3d63de248f683be76a1ea4a81646813ff7d4b085 (patch)
treedb4bccda09f7d7063468ce3f4e63d5284c5e0471 /gcc
parentf8ef3ed189309ed69b11bc182297f3441c7847d6 (diff)
downloadgcc-3d63de248f683be76a1ea4a81646813ff7d4b085.zip
gcc-3d63de248f683be76a1ea4a81646813ff7d4b085.tar.gz
gcc-3d63de248f683be76a1ea4a81646813ff7d4b085.tar.bz2
re PR other/12315 (ICE using -p with functions returning structs)
PR 12315 * final.c (profile_function): Allow for NULL svrtx. From-SVN: r73165
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/final.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 90e6b6e..a4ca9c7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/final.c b/gcc/final.c
index 20ceff8..f8750e9 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -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
}