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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-02-27
                 CC|                            |msebor at gcc dot gnu.org
      Known to work|                            |4.5.4, 5.4.0
     Ever confirmed|0                           |1
      Known to fail|                            |6.4.0, 7.3.0, 8.0

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
Confirmed.  The ICE was introduced by my r231665 in GCC 6.0.0:

r231665 | msebor | 2015-12-15 16:04:08 -0500 (Tue, 15 Dec 2015) | 71 lines

gcc/cp/ChangeLog:
2015-12-15  Martin Sebor  <mse...@redhat.com>

        c++/42121
        c++/68478
        c++/68613
        c++/68689
        c++/68710
        * class.c (walk_subobject_offsets): Avoid assuming type domain
        is non-null or has an upper bound.
        (layout_class_type): Include type size in error message.
        (flexmems_t): New type.
        (field_nonempty_p, find_flexarrays, diagnose_flexarrays)
        (check_flexarrays): New functions.
        (finish_struct_1): Call check_flexarrays.
        * decl.c (compute_array_index_type): Distinguish flexible array
        members from zero-length arrays.
        (grokdeclarator): Reject flexible array members in unions.  Avoid
        rejecting members of incomplete types that are flexible array members.
        * error.c (dump_type_suffix): Handle flexible array members with null
        upper bound.
        * init.c (perform_member_init): Same.
        * pt.c (instantiate_class_template_1): Allow flexible array members.
        (tsubst): Handle flexible array members with null upper bound.
        * typeck2.c (digest_init_r): Warn for initialization of flexible
        array members.
        (process_init_constructor_record): Handle flexible array members.

gcc/ChangeLog:
2015-12-15  Martin Sebor  <mse...@redhat.com>

        c++/42121
        * tree-chkp.c (chkp_find_bound_slots_1): Handle flexible array
        members.
        * tree.c (type_contains_placeholder_1): Avoid assuming type has
        a non-null domain or an upper bound to handle flexible array
        members.
        * varasm.c (output_constructor_regular_field):  Same.
        (output_constructor): Set min_index to integer_zero_node rather
        than null when a type has no domain to avoid crashing later.

Reply via email to