https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89119
Bug ID: 89119 Summary: internal compiler error: in tsubst_copy with RANGE_EXPR Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mpolacek at gcc dot gnu.org Target Milestone: --- struct S { int a[2]; }; template <typename T> void fn () { constexpr S s = S(); } void foo () { fn<int>(); } $ ./cc1plus -quiet ice1.C ice1.C: In instantiation of ‘void fn() [with T = int]’: ice1.C:13:11: required from here ice1.C:7:15: internal compiler error: in tsubst_copy, at cp/pt.c:16024 7 | constexpr S s = S(); | ^ 0xae38ee tsubst_copy /home/mpolacek/src/gcc/gcc/cp/pt.c:16024 0xaf7879 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) /home/mpolacek/src/gcc/gcc/cp/pt.c:19433 0xaf6667 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) /home/mpolacek/src/gcc/gcc/cp/pt.c:19212 0xaf6809 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) /home/mpolacek/src/gcc/gcc/cp/pt.c:19236 0xaef556 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) /home/mpolacek/src/gcc/gcc/cp/pt.c:17756 0xae0510 tsubst_init /home/mpolacek/src/gcc/gcc/cp/pt.c:15350 0xae9772 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) /home/mpolacek/src/gcc/gcc/cp/pt.c:16997 0xaeacad tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) /home/mpolacek/src/gcc/gcc/cp/pt.c:17163 0xb0d5e4 instantiate_decl(tree_node*, bool, bool) /home/mpolacek/src/gcc/gcc/cp/pt.c:24529 0xb0dfbf instantiate_pending_templates(int) /home/mpolacek/src/gcc/gcc/cp/pt.c:24645 0x9919a7 c_parse_final_cleanups() /home/mpolacek/src/gcc/gcc/cp/decl2.c:4792 0xc4a5ec c_common_parse_file() /home/mpolacek/src/gcc/gcc/c-family/c-opts.c:1177 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.