[Bug c++/77522] [6/7/8 Regression] ICE on invalid code C++14 code: in tsubst_decl, at cp/pt.c:12447
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Feb 9 10:59:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77522
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The ICE got fixed with r251433. Since then the error is:
pr77522.C: In instantiation of ‘void f(T) [with T = int]’:
pr77522.C:8:7: required from here
pr77522.C:3:8: error: use of ‘f(T) [with T = int]::<lambda()>::__a’ before
deduction of ‘auto’
auto g = [&a = f] () {};
^
pr77522.C:3:12: error: invalid initialization of non-const reference of type
‘auto&’ from an rvalue of type ‘<unresolved overloaded function type>’
auto g = [&a = f] () {};
^
Paolo, will you check the testcase in and remove 8 Regression?
More information about the Gcc-bugs
mailing list