[Bug c++/88180] [7/8/9 Regression] ICE in vec<tree_node*, va_gc, vl_embed>::quick_push(tree_node* const&)

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Nov 26 11:30:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88180

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-11-26
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |jason at gcc dot gnu.org,
                   |                            |nathan at gcc dot gnu.org
   Target Milestone|---                         |7.4
            Summary|ICE in vec<tree_node*,      |[7/8/9 Regression] ICE in
                   |va_gc,                      |vec<tree_node*, va_gc,
                   |vl_embed>::quick_push(tree_ |vl_embed>::quick_push(tree_
                   |node* const&)               |node* const&)
     Ever confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Used to be accepted e.g. in r147702 and before, r147776 hangs on it (no
revisions in between), r152040 still hangs, r152438 already ICEs.

The problem is that there is a ggc_collect in the middle of
cp_parser_parenthesized_expression_list which isn't prepared to handle GC in
the middle of it:
#1  0x0000000000c56be6 in poison_pages () at ../../gcc/ggc-page.c:2112
#2  0x0000000000c56d6a in ggc_collect () at ../../gcc/ggc-page.c:2207
#3  0x0000000000d30095 in cgraph_node::finalize_function (decl=<function_decl
0x7fffefdda200 c>, no_collect=false) at ../../gcc/cgraphunit.c:492
#4  0x0000000000b18c8c in expand_or_defer_fn (fn=<function_decl 0x7fffefdda200
c>) at ../../gcc/cp/semantics.c:4300
#5  0x0000000000a34edf in cp_parser_function_definition_after_declarator
(parser=0x7ffff7ff6ab0, inline_p=true) at ../../gcc/cp/parser.c:27338
#6  0x0000000000a375f6 in cp_parser_late_parsing_for_member
(parser=0x7ffff7ff6ab0, member_function=<function_decl 0x7fffefdda200 c>)
    at ../../gcc/cp/parser.c:28215
#7  0x0000000000a2d75f in cp_parser_class_specifier_1 (parser=0x7ffff7ff6ab0)
at ../../gcc/cp/parser.c:23240
#8  0x0000000000a2d83c in cp_parser_class_specifier (parser=0x7ffff7ff6ab0) at
../../gcc/cp/parser.c:23266
#9  0x0000000000a210e5 in cp_parser_type_specifier (parser=0x7ffff7ff6ab0,
flags=1, decl_specs=0x7fffffffc650, is_declaration=false, 
    declares_class_or_enum=0x0, is_cv_qualifier=0x7fffffffc5f3) at
../../gcc/cp/parser.c:17231
#10 0x0000000000a29c09 in cp_parser_type_specifier_seq (parser=0x7ffff7ff6ab0,
is_declaration=false, is_trailing_return=false, 
    type_specifier_seq=0x7fffffffc650) at ../../gcc/cp/parser.c:21602
#11 0x0000000000a2970f in cp_parser_type_id_1 (parser=0x7ffff7ff6ab0,
is_template_arg=false, is_trailing_return=false, type_location=0x0)
    at ../../gcc/cp/parser.c:21445
#12 0x0000000000a29a78 in cp_parser_type_id (parser=0x7ffff7ff6ab0,
type_location=0x0) at ../../gcc/cp/parser.c:21518
#13 0x0000000000a12c73 in cp_parser_builtin_offsetof (parser=0x7ffff7ff6ab0) at
../../gcc/cp/parser.c:10013
#14 0x0000000000a08c8c in cp_parser_primary_expression (parser=0x7ffff7ff6ab0,
address_p=false, cast_p=false, template_arg_p=false, 
    decltype_p=false, idk=0x7fffffffccdc) at ../../gcc/cp/parser.c:5488
#15 0x0000000000a0c9bf in cp_parser_postfix_expression (parser=0x7ffff7ff6ab0,
address_p=false, cast_p=false, member_access_only_p=false, 
    decltype_p=false, pidk_return=0x0) at ../../gcc/cp/parser.c:7096
#16 0x0000000000a0feea in cp_parser_unary_expression (parser=0x7ffff7ff6ab0,
pidk=0x0, address_p=false, cast_p=false, decltype_p=false)
    at ../../gcc/cp/parser.c:8382
#17 0x0000000000a11363 in cp_parser_cast_expression (parser=0x7ffff7ff6ab0,
address_p=false, cast_p=false, decltype_p=false, pidk=0x0)
    at ../../gcc/cp/parser.c:9265
#18 0x0000000000a11450 in cp_parser_binary_expression (parser=0x7ffff7ff6ab0,
cast_p=false, no_toplevel_fold_p=false, decltype_p=false, 
    prec=PREC_NOT_OPERATOR, pidk=0x0) at ../../gcc/cp/parser.c:9366
#19 0x0000000000a12256 in cp_parser_assignment_expression
(parser=0x7ffff7ff6ab0, pidk=0x0, cast_p=false, decltype_p=false)
    at ../../gcc/cp/parser.c:9661
#20 0x0000000000a12a4e in cp_parser_constant_expression (parser=0x7ffff7ff6ab0,
allow_non_constant_p=true, non_constant_p=0x7fffffffd89f, 
    strict_p=false) at ../../gcc/cp/parser.c:9945
#21 0x0000000000a0ea00 in cp_parser_parenthesized_expression_list
(parser=0x7ffff7ff6ab0, is_attribute_list=0, cast_p=false, 
    allow_expansion_p=true, non_constant_p=0x7fffffffda16, close_paren_loc=0x0,
wrap_locations_p=false) at ../../gcc/cp/parser.c:7812

I think this is usually solved with temporarily bumping function_depth
somewhere, but it isn't clear to me where that should be.


More information about the Gcc-bugs mailing list