From: Richard Sandiford Date: Fri, 27 Jun 2008 17:26:14 +0000 (+0000) Subject: function.c (allocate_struct_function): Only allocate a unique funcdef_no if the decl... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=70cf5bc1f101cb34ac6ecc867ea9c10325bb1f4d;p=gcc.git function.c (allocate_struct_function): Only allocate a unique funcdef_no if the decl is nonzero. gcc/ * function.c (allocate_struct_function): Only allocate a unique funcdef_no if the decl is nonzero. From-SVN: r137195 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 30dea0f21fd..c8ddda0b721 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2008-06-27 Richard Sandiford + + * function.c (allocate_struct_function): Only allocate a unique + funcdef_no if the decl is nonzero. + 2008-06-27 Richard Sandiford * config/mips/mips-protos.h (mips_split_const_insns): Declare. diff --git a/gcc/function.c b/gcc/function.c index c8d5e77daaa..680b3604859 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -3843,8 +3843,6 @@ allocate_struct_function (tree fndecl, bool abstract_p) cfun = GGC_CNEW (struct function); - current_function_funcdef_no = get_next_funcdef_no (); - cfun->function_frequency = FUNCTION_FREQUENCY_NORMAL; init_eh_for_function (); @@ -3860,6 +3858,7 @@ allocate_struct_function (tree fndecl, bool abstract_p) { DECL_STRUCT_FUNCTION (fndecl) = cfun; cfun->decl = fndecl; + current_function_funcdef_no = get_next_funcdef_no (); result = DECL_RESULT (fndecl); if (!abstract_p && aggregate_value_p (result, fndecl))