https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87463
Bug ID: 87463 Summary: ICE in in tsubst_copy, at cp/pt.c:15513 Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: larsbj at gullik dot net Target Milestone: --- Created attachment 44764 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44764&action=edit Source file showing the problem When I compile the attached code I get this ICE: g++ -v Using built-in specs. COLLECT_GCC=/opt/gcc/gcc-9/bin/g++ COLLECT_LTO_WRAPPER=/opt/gcc/gcc-9/libexec/gcc/x86_64-pc-linux-gnu/9.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc/configure --prefix=/opt/gcc/gcc-9 --enable-checking=release --enable-languages=c,c++ Thread model: posix gcc version 9.0.0 20180925 (experimental) (GCC) g++ -c foo.cpp foo.cpp: In instantiation of ‘void l() [with <template-parameter-1-1> = int]’: foo.cpp:17:12: required from here foo.cpp:12:5: internal compiler error: in tsubst_copy, at cp/pt.c:15513 12 | ""_a; | ^~~~ 0x59e988 tsubst_copy ../../gcc/gcc/cp/pt.c:15513 0x6d083f tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../gcc/gcc/cp/pt.c:19039 0x6cfa0c tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../gcc/gcc/cp/pt.c:18309 0x6c18dc tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../gcc/gcc/cp/pt.c:17455 0x6c1602 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../gcc/gcc/cp/pt.c:16650 0x6c0bc2 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../gcc/gcc/cp/pt.c:16939 0x6db708 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../gcc/gcc/cp/pt.c:16621 0x6db708 instantiate_decl(tree_node*, bool, bool) ../../gcc/gcc/cp/pt.c:24099 0x6ddbd3 instantiate_pending_templates(int) ../../gcc/gcc/cp/pt.c:24215 0x63fd80 c_parse_final_cleanups() ../../gcc/gcc/cp/decl2.c:4709