From 3d63de248f683be76a1ea4a81646813ff7d4b085 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Sat, 1 Nov 2003 00:48:50 +0000 Subject: [PATCH] re PR other/12315 (ICE using -p with functions returning structs) PR 12315 * final.c (profile_function): Allow for NULL svrtx. From-SVN: r73165 --- gcc/ChangeLog | 5 +++++ gcc/final.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 90e6b6e59d4..a4ca9c79e7d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-11-01 Alan Modra + + PR 12315 + * final.c (profile_function): Allow for NULL svrtx. + 2003-10-31 John David Anglin * pa.c (pa_select_section): Use new style declaration. diff --git a/gcc/final.c b/gcc/final.c index 20ceff8b7c0..f8750e98872 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 } -- 2.30.2