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

--- Comment #19 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
TYPE_CANONICAL is the main discriminant used for aggregate types by the type
system (as implemented by useless_type_conversion_p). In this regard, how can
"For checking or computing TYPE_CANONICAL, ignore the array size when it is the
last element of a structure or union." be correct?  Moreover, in Ada, array
types can have arbitrary bounds so, even if they have the same size, they are
not considered compatible when their bounds are different, which is exactly
what gimple_canonical_types_compatible_p and hash_canonical_type implement, so
the recursion on the type itself, instead of just its TREE_TYPE, is necessary.

Reply via email to