From: Alan Modra Date: Sat, 1 Nov 2003 00:48:50 +0000 (+0000) Subject: re PR other/12315 (ICE using -p with functions returning structs) X-Git-Tag: releases/gcc-3.4.0~2566 X-Git-Url: https://gcc.gnu.org/git/?a=commitdiff_plain;h=3d63de248f683be76a1ea4a81646813ff7d4b085;p=gcc.git re PR other/12315 (ICE using -p with functions returning structs) PR 12315 * final.c (profile_function): Allow for NULL svrtx. From-SVN: r73165 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 90e6b6e59d4a..a4ca9c79e7df 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 20ceff8b7c05..f8750e98872f 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 }