Skip to content
Snippets Groups Projects
Commit 556e25f0 authored by Richard Biener's avatar Richard Biener Committed by Richard Biener
Browse files

middle-end/97323 - TYPE_CANONICAL vs. ARRAY_TYPE modes

For strict-alignment targets we can end up with BLKmode single-element
array types when the element type is unaligned.  This confuses
type checking since the canonical type would have an aligned
element type and a non-BLKmode mode.  The following simply ignores
the mode we assign to array types for this purpose, like we already
do for record and union types.

	PR middle-end/97323
	* tree.cc (gimple_canonical_types_compatible_p): Ignore
	TYPE_MODE also for ARRAY_TYPE.
	(verify_type): Likewise.

	* gcc.dg/pr97323.c: New testcase.
parent 2653d988
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment