Nathan Sidwell <nat...@acm.org> wrote:

On 4/30/20 9:24 AM, Iain Sandoe wrote:

The testcase ICEs because the range-based for generates three
artificial variables that need to be allocated to the coroutine
frame but, when walking the BIND_EXR that contains these, the
DECL_INITIAL for one of them refers to an entry appearing later,
which means that the frame entry hasn't been allocated when that
INITIAL is walked.

Hm, the error seems to be the range for's construction, did you look at altering that so that such forward references do not occur? (range for is described as a src->src xform, so I'm sure it's possible to xform it into something a user could have written, which a forward-reference is not)

It looks like the range-for lowering doesn’t quite do what its header comment says.
Tracked as PR 94897.

your patch is ok, if that for change's not simple.

not something that could have been done in the last hours before branching 10 ;)

thanks
Iain


Reply via email to