https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70353
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |msebor at gcc dot gnu.org Blocks| |55004 Known to fail| |5.2.1, 6.0 --- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> --- The trigger seems to be __PRETTY_FUNCTION__. Below is a smaller test case: constexpr int ce (int r) { const char *s = __PRETTY_FUNCTION__; return r; } constexpr int i = ce (3); v.c: In function ‘constexpr int ce(int)’: v.c:3:16: warning: unused variable ‘s’ [-Wunused-variable] const char *s = __PRETTY_FUNCTION__; ^ v.c: At global scope: v.c:7:22: in constexpr expansion of ‘ce(3)’ v.c:7:24: internal compiler error: Segmentation fault constexpr int i = ce (3); ^ 0x10d5326 crash_signal /src/gcc/trunk/gcc/toplev.c:335 0x7ce697 bool vec_safe_reserve<tree_node*, va_gc>(vec<tree_node*, va_gc, vl_embed>*&, unsigned int, bool) /src/gcc/trunk/gcc/vec.h:553 0x7ce1aa tree_node** vec_safe_push<tree_node*, va_gc>(vec<tree_node*, va_gc, vl_embed>*&, tree_node* const&) /src/gcc/trunk/gcc/vec.h:647 0xd48a73 add_local_decl(function*, tree_node*) /src/gcc/trunk/gcc/function.c:6795 0x1169cf1 remap_decls /src/gcc/trunk/gcc/tree-inline.c:620 0x116a19a remap_block /src/gcc/trunk/gcc/tree-inline.c:688 0x116a55d copy_bind_expr /src/gcc/trunk/gcc/tree-inline.c:761 0x116ba51 copy_tree_body_r(tree_node**, int*, void*) /src/gcc/trunk/gcc/tree-inline.c:1095 0x140ec4b walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, default_hash_traits<tree_node*> >*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, default_hash_traits<tree_node*> >*)) /src/gcc/trunk/gcc/tree.c:11531 0x11720b8 copy_tree_body /src/gcc/trunk/gcc/tree-inline.c:2946 0x117b678 copy_fn(tree_node*, tree_node*&, tree_node*&) /src/gcc/trunk/gcc/tree-inline.c:6151 0xa7a19d cxx_eval_call_expression /src/gcc/trunk/gcc/cp/constexpr.c:1368 0xa81d72 cxx_eval_constant_expression /src/gcc/trunk/gcc/cp/constexpr.c:3407 0xa83fb3 cxx_eval_outermost_constant_expr /src/gcc/trunk/gcc/cp/constexpr.c:3973 0xa84611 cxx_constant_value(tree_node*, tree_node*) /src/gcc/trunk/gcc/cp/constexpr.c:4062 0x89f86c store_init_value(tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed>**, int) /src/gcc/trunk/gcc/cp/typeck2.c:822 0x7ec411 check_initializer /src/gcc/trunk/gcc/cp/decl.c:6155 0x7ef3db cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) /src/gcc/trunk/gcc/cp/decl.c:6800 0x9282b6 cp_parser_init_declarator /src/gcc/trunk/gcc/cp/parser.c:18658 0x91d806 cp_parser_simple_declaration /src/gcc/trunk/gcc/cp/parser.c:12379 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55004 [Bug 55004] [meta-bug] constexpr issues