This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR34081/C++ ICE in s390_function_value

On Fri, Nov 23, 2007 at 04:00:03PM +0100, Andreas Krebbel wrote:
> > The middle-end parts are ok.  The frontend parts would then qualify
> > as obvious apart from
> > 
> >    bl = current_binding_level;
> > !   allocate_struct_function (decl1, dependent_type_p (restype));
> > 
> > where I wonder if we shouldn't use processing_template_p instead of
> > dependent_type_p?
> You mean processing_template_decl?!

processing_template_decl, sure.
I believe non-dependent types should be already laid out by the time
this is called and therefore dependent_type_p (restype) should work
just fine as the argument.
Perhaps Richard wanted to pass processing_template_decl because computing it
is cheaper?
In templates we probably don't need current_function_returns_struct
at all, so both should work.  The only place in C++ FE which uses
current_function_returns_struct is in check_return_expr, but we do
  if (processing_template_decl)
      current_function_returns_value = 1;
      check_for_bare_parameter_packs (&retval);
      return retval;
before we reach its use.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]