https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84664
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P4 Status|UNCONFIRMED |NEW Last reconfirmed| |2018-03-02 CC| |jakub at gcc dot gnu.org, | |jason at gcc dot gnu.org Target Milestone|--- |8.0 Summary|internal compiler error: in |[8 Regression] internal |cp_perform_integral_promoti |compiler error: in |ons, at cp/typeck.c:2172 |cp_perform_integral_promoti | |ons, at cp/typeck.c:2172 Ever confirmed|0 |1 --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- void foo () { auto &b = 1; [] { b > 0; }; } Error-recovery ICE started with r253601, before that we got just: pr84664.C: In function ‘void foo()’: pr84664.C:4:13: error: cannot bind non-const lvalue reference of type ‘int&’ to an rvalue of type ‘int’ auto &b = 1; ^ pr84664.C: In lambda function: pr84664.C:5:12: error: ‘b’ is not captured [] { b > 0; }; ^ pr84664.C:5:4: note: the lambda has no capture-default [] { b > 0; }; ^ pr84664.C:4:9: note: ‘int& b’ declared here auto &b = 1; ^