Re: C++ PATCH for c++/87152, range-based for loops with initializer broken in templates

2018-09-07 Thread Jason Merrill
OK On Fri, Sep 7, 2018 at 4:29 AM, Marek Polacek wrote: > Turned out our range-based for loops with initializer are completely broken > in templates, because I neglected to add the init-statement to RANGE_FOR_STMT. > range-for18.C should verify we put it into the right scope. > > tsubst_expr then

C++ PATCH for c++/87152, range-based for loops with initializer broken in templates

2018-09-06 Thread Marek Polacek
Turned out our range-based for loops with initializer are completely broken in templates, because I neglected to add the init-statement to RANGE_FOR_STMT. range-for18.C should verify we put it into the right scope. tsubst_expr then needs to recurse on it to avoid the ICE. Bootstrapped/regtested o