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

--- Comment #22 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Richard Biener
<rgue...@gcc.gnu.org>:

https://gcc.gnu.org/g:1d89cb43943e77d0bbb48fd5a58a352bdd3d82c7

commit r14-10211-g1d89cb43943e77d0bbb48fd5a58a352bdd3d82c7
Author: Richard Biener <rguent...@suse.de>
Date:   Fri May 3 10:44:50 2024 +0200

    middle-end/114931 - type_hash_canon and structual equality types

    TYPE_STRUCTURAL_EQUALITY_P is part of our type system so we have
    to make sure to include that into the type unification done via
    type_hash_canon.  This requires the flag to be set before querying
    the hash which is the biggest part of the patch.

            PR middle-end/114931
    gcc/
            * tree.cc (type_hash_canon_hash): Hash TYPE_STRUCTURAL_EQUALITY_P.
            (type_cache_hasher::equal): Compare TYPE_STRUCTURAL_EQUALITY_P.
            (build_array_type_1): Set TYPE_STRUCTURAL_EQUALITY_P before
            probing with type_hash_canon.
            (build_function_type): Likewise.
            (build_method_type_directly): Likewise.
            (build_offset_type): Likewise.
            (build_complex_type): Likewise.
            * attribs.cc (build_type_attribute_qual_variant): Likewise.

    gcc/c-family/
            * c-common.cc (complete_array_type): Set TYPE_STRUCTURAL_EQUALITY_P
            before probing with type_hash_canon.

    gcc/testsuite/
            * gcc.dg/pr114931.c: New testcase.

    (cherry picked from commit b09c2e9560648b0cf993c2ca9ad972c34e6bddfa)

Reply via email to