[Bug c++/126811] [14/15/16/17 Regression] c++: ICE in tsubst when a constexpr init contains an NSDMI

"iains at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126811

--- Comment #1 from Iain Sandoe <iains at gcc dot gnu.org> ---
better backtrace:
 internal compiler error: in tsubst_expr, at cp/pt.cc:23634
    2 | template<class T> void g() { constexpr S s = {}; (void) s; }
      |                                               ^
0x2ddc95f internal_error(char const*, ...)
        ../../src/gcc/diagnostic-global-context.cc:787
0xb7a51d fancy_abort(char const*, int, char const*)
        ../../src/gcc/diagnostics/context.cc:1813
0x8926ae tsubst_expr(tree_node*, tree_node*, int, tree_node*)
        ../../src/gcc/cp/pt.cc:23634
0xe1e422 tsubst_expr(tree_node*, tree_node*, int, tree_node*)
        ../../src/gcc/cp/pt.cc:23033
0xc066e1 fold_non_dependent_expr_template
        ../../src/gcc/cp/constexpr.cc:11562
0xf07a89 store_init_value(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
        ../../src/gcc/cp/typeck2.cc:1079
0xc90763 check_initializer
        ../../src/gcc/cp/decl.cc:8759
0xc973ca cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int,
cp_decomp*)
        ../../src/gcc/cp/decl.cc:9879
0xdd896a cp_parser_init_declarator
        ../../src/gcc/cp/parser.cc:26515
0xddae3a cp_parser_simple_declaration
        ../../src/gcc/cp/parser.cc:18196
0xddedde cp_parser_declaration_statement
        ../../src/gcc/cp/parser.cc:17052
0xd9f0b6 cp_parser_statement
        ../../src/gcc/cp/parser.cc:14559
0xda2b60 cp_parser_statement_seq_opt
        ../../src/gcc/cp/parser.cc:15129
0xda2e6f cp_parser_compound_statement
        ../../src/gcc/cp/parser.cc:14976
0xddef65 cp_parser_function_body
        ../../src/gcc/cp/parser.cc:28999
0xddef65 cp_parser_ctor_initializer_opt_and_function_body
        ../../src/gcc/cp/parser.cc:29050
0xda31c7 cp_parser_function_definition_after_declarator
        ../../src/gcc/cp/parser.cc:36351
0xdd96fc cp_parser_function_definition_from_specifiers_and_declarator
        ../../src/gcc/cp/parser.cc:36266
0xdd96fc cp_parser_init_declarator
        ../../src/gcc/cp/parser.cc:26179
0xdd9c75 cp_parser_single_declaration
        ../../src/gcc/cp/parser.cc:36770
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.