Commit 7f64e37c authored by Eric Botcazou's avatar Eric Botcazou Committed by Marc Poulhiès
Browse files

[Ada] Fix crash on declaration of overaligned array with constraints

The semantic analyzer was setting the Is_Constr_Subt_For_UN_Aliased flag on
the actual subtype of the object, which is incorrect because the nominal
subtype is constrained.  This also adjusts a recent related change.

gcc/ada/

	* exp_util.adb (Expand_Subtype_From_Expr): Check for the presence
	of the Is_Constr_Subt_For_U_Nominal flag instead of the absence
	of the Is_Constr_Subt_For_UN_Aliased flag on the subtype of the
	expression of an object declaration before reusing this subtype.
	* sem_ch3.adb (Analyze_Object_Declaration): Do not incorrectly
	set the Is_Constr_Subt_For_UN_Aliased flag on the actual subtype
	of an array with definite nominal subtype.  Remove useless test.
parent 08a897d4
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment