This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/77522] [5/6/7 Regression] ICE on invalid code C++14 code: in tsubst_decl, at cp/pt.c:12447
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 15 Sep 2016 14:37:20 +0000
- Subject: [Bug c++/77522] [5/6/7 Regression] ICE on invalid code C++14 code: in tsubst_decl, at cp/pt.c:12447
- Auto-submitted: auto-generated
- References: <bug-77522-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77522
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org,
| |jason at gcc dot gnu.org
Target Milestone|--- |5.5
Summary|ICE on invalid code C++14 |[5/6/7 Regression] ICE on
|code: in tsubst_decl, at |invalid code C++14 code: in
|cp/pt.c:12447 |tsubst_decl, at
| |cp/pt.c:12447
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r210017. Before that it has been rejected:
pr77522.C: In function ‘void f(T)’:
pr77522.C:3:18: error: cannot capture ‘f’ by reference
auto g = [&a = f] () {};
^
pr77522.C: In instantiation of ‘struct f(T) [with T = int]::<lambda>’:
pr77522.C:3:25: required from ‘void f(T) [with T = int]’
pr77522.C:8:7: required from here
pr77522.C:3:18: error: unable to deduce ‘auto’ from ‘f’
pr77522.C:3:18: error: using invalid field ‘f(T)::<lambda()>::a’