This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/79372] ICE on C++ code with illegal decomposition declaration on x86_64-linux-gnu: in tsubst_decomp_names, at cp/pt.c:15599
- From: "dmalcolm at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 06 Feb 2017 16:09:58 +0000
- Subject: [Bug c++/79372] ICE on C++ code with illegal decomposition declaration on x86_64-linux-gnu: in tsubst_decomp_names, at cp/pt.c:15599
- Auto-submitted: auto-generated
- References: <bug-79372-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79372
David Malcolm <dmalcolm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-02-06
CC| |dmalcolm at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Thanks for filing this bug.
Confirmed.
The ICE began with r242377 (aka 9c8aeb661a9d6cc82186dde40839f7353188c187):
Implement P0217R3 - C++17 structured bindings
where the reproducer transitions from (r242376):
test.cc:4:20: error: expected unqualified-id before ‘[’ token
void f () { auto [x] = 0; }
^
to (r242377):
test.cc:4:20: warning: decomposition declaration only available with -std=c++1z
or -std=gnu++1z
void f () { auto [x] = 0; }
^
test.cc:4:20: error: cannot decompose non-array non-class type ‘int’
void f () { auto [x] = 0; }
^~~
int main() S<int> void S<T>::f() [with T = int]
test.cc: In instantiation of ‘void S<T>::f() [with T = int]’:
test.cc:10:8: required from here
test.cc:4:20: internal compiler error: in tsubst_decomp_names, at cp/pt.c:15338
0x816413 tsubst_decomp_names
../../gcc/cp/pt.c:15338
0x817922 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
../../gcc/cp/pt.c:15512
0x818705 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
../../gcc/cp/pt.c:15618
0x83ac5b instantiate_decl(tree_node*, int, bool)
../../gcc/cp/pt.c:22536
0x83b5ef instantiate_pending_templates(int)
../../gcc/cp/pt.c:22655
0x8a27dd c_parse_final_cleanups()
../../gcc/cp/decl2.c:4509
0xabc798 c_common_parse_file()
../../gcc/c-family/c-opts.c:1113