From 2033a41a96dfcbff14006e26bbc251783ea3e8a3 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Mon, 17 Mar 1997 17:30:17 -0500 Subject: [PATCH] (RETURN_POPS_ARGS): Make sure FUDECL is non-nil before we try to use it. From-SVN: r13729 --- gcc/config/gmicro/gmicro.h | 4 ++-- gcc/config/m68k/m68k.h | 2 +- gcc/config/ns32k/ns32k.h | 4 ++-- gcc/config/pyr/pyr.h | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gcc/config/gmicro/gmicro.h b/gcc/config/gmicro/gmicro.h index 1cb6cc9ef7b..29701f25fd7 100644 --- a/gcc/config/gmicro/gmicro.h +++ b/gcc/config/gmicro/gmicro.h @@ -1,5 +1,5 @@ /* Definitions of target machine for GNU compiler. Gmicro (TRON) version. - Copyright (C) 1987, 1988, 1989, 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1987, 88, 89, 95, 96, 1997 Free Software Foundation, Inc. Contributed by Masanobu Yuhara, Fujitsu Laboratories LTD. (yuhara@flab.fujitsu.co.jp) @@ -460,7 +460,7 @@ extern enum reg_class regno_reg_class[]; for the Gmicro. The option name may be changed in the future. */ #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \ - ((TARGET_RTD && TREE_CODE (FUNDECL) != IDENTIFIER_NODE \ + ((TARGET_RTD && (!(FUNDECL) || TREE_CODE (FUNDECL) != IDENTIFIER_NODE) \ && (TYPE_ARG_TYPES (FUNTYPE) == 0 \ || (TREE_VALUE (tree_last (TYPE_ARG_TYPES (FUNTYPE))) \ == void_type_node))) \ diff --git a/gcc/config/m68k/m68k.h b/gcc/config/m68k/m68k.h index 0fba33d5b71..fc5a66971c4 100644 --- a/gcc/config/m68k/m68k.h +++ b/gcc/config/m68k/m68k.h @@ -824,7 +824,7 @@ extern enum reg_class regno_reg_class[]; the caller must always pop the args. */ #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \ - ((TARGET_RTD && TREE_CODE (FUNDECL) != IDENTIFIER_NODE \ + ((TARGET_RTD && (!(FUNDECL) || TREE_CODE (FUNDECL) != IDENTIFIER_NODE) \ && (TYPE_ARG_TYPES (FUNTYPE) == 0 \ || (TREE_VALUE (tree_last (TYPE_ARG_TYPES (FUNTYPE))) \ == void_type_node))) \ diff --git a/gcc/config/ns32k/ns32k.h b/gcc/config/ns32k/ns32k.h index 854c794314f..70cd9f201ae 100644 --- a/gcc/config/ns32k/ns32k.h +++ b/gcc/config/ns32k/ns32k.h @@ -1,5 +1,5 @@ /* Definitions of target machine for GNU compiler. NS32000 version. - Copyright (C) 1988, 1993, 1994, 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1988, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) This file is part of GNU CC. @@ -405,7 +405,7 @@ enum reg_class { NO_REGS, GENERAL_REGS, FLOAT_REGS, GEN_AND_FP_REGS, the caller must always pop the args. */ #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \ - ((TARGET_RTD && TREE_CODE (FUNDECL) != IDENTIFIER_NODE \ + ((TARGET_RTD && (!(FUNDECL) || TREE_CODE (FUNDECL) != IDENTIFIER_NODE) \ && (TYPE_ARG_TYPES (FUNTYPE) == 0 \ || (TREE_VALUE (tree_last (TYPE_ARG_TYPES (FUNTYPE))) \ == void_type_node))) \ diff --git a/gcc/config/pyr/pyr.h b/gcc/config/pyr/pyr.h index 407a39ed7ce..ea88ee4ba10 100644 --- a/gcc/config/pyr/pyr.h +++ b/gcc/config/pyr/pyr.h @@ -1,6 +1,6 @@ /* Definitions of target machine parameters for GNU compiler, for Pyramid 90x, 9000, and MIServer Series. - Copyright (C) 1989, 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1989, 1995, 1996, 1997 Free Software Foundation, Inc. This file is part of GNU CC. @@ -495,7 +495,7 @@ enum reg_class { NO_REGS, ALL_REGS, LIM_REG_CLASSES }; We may nevertheless provide this as an option. */ #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \ - ((TARGET_RETD && TREE_CODE (FUNDECL) != IDENTIFIER_NODE \ + ((TARGET_RETD && (!(FUNDECL) || TREE_CODE (FUNDECL) != IDENTIFIER_NODE) \ && (TYPE_ARG_TYPES (FUNTYPE) == 0 \ || (TREE_VALUE (tree_last (TYPE_ARG_TYPES (FUNTYPE))) \ == void_type_node))) \ -- 2.30.2