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 1/4] Support lambda templates.

On 05.09.2013 20:14, Adam Butcher wrote:
On 03.09.2013 22:25, Jason Merrill wrote:
On 09/03/2013 03:50 PM, Adam Butcher wrote:
Problem is that no RTL is set for the incoming parms in the
instantiation of the expansion. It ICEs in gimple_expand_cfg because 'DECL_RTL_IF_SET (var)' returns nullptr for the incoming parms resulting in a failed assertion that
SA.partition_to_pseudo[i] is non-null.

Sounds like a problem with how _FUN's parameters are instantiated.
I'm not sure why it would be special.

Does using a function parameter pack in the lambda body work
currently?  If so, how are the expanded parameters different?

Yes it does work.  And I think (hope) I've cracked it;
make_pack_expansion needs to be called in the body of the thunk (i.e.
after start_preparsed_function).

Okay, this worked because it had the side effect of setting PACK_EXPANSION_LOCAL_P on the expansion.

Doing that at the top, in the existing code seems to have the same effect.


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