On Thursday 17 November 2005 23:35, Jim Wilson wrote: > > I've checked in a patch to fix the comment typo.
Thanks, What do you thing about adding an assert? Something similar to the attached patch. Rafael
Index: gcc/function.c
===================================================================
--- gcc/function.c (revision 107249)
+++ gcc/function.c (working copy)
@@ -1711,8 +1711,11 @@ aggregate_value_p (tree exp, tree fntype
{
int i, regno, nregs;
rtx reg;
+ tree type;
- tree type = (TYPE_P (exp)) ? exp : TREE_TYPE (exp);
+ gcc_assert (exp != NULL_TREE);
+
+ type = (TYPE_P (exp)) ? exp : TREE_TYPE (exp);
if (fntype)
switch (TREE_CODE (fntype))
@@ -3805,6 +3808,7 @@ allocate_struct_function (tree fndecl)
cfun->decl = fndecl;
result = DECL_RESULT (fndecl);
+ gcc_assert (result != NULL_TREE);
if (aggregate_value_p (result, fndecl))
{
#ifdef PCC_STATIC_STRUCT_RETURN
pgp7LsOsWooHN.pgp
Description: PGP signature
