Commit 2514b839 by Ed Schonberg Committed by Geert Bosch

sem_ch3.adb (Analyze_Object_Declaration): If expression is an aggregate with static wrong size...

	* sem_ch3.adb (Analyze_Object_Declaration): If expression is an
	aggregate with static wrong size, attach generated Raise node to
	declaration.

From-SVN: r47685
parent 82ae7822
2001-12-05 Ed Schonberg <schonber@gnat.com>
* sem_ch3.adb (Analyze_Object_Declaration): If expression is an
aggregate with static wrong size, attach generated Raise node to
declaration.
2001-12-05 Robert Dewar <dewar@gnat.com>
* sem_attr.adb (Analyze_Attribute): Defend against bad Val attribute.
......
......@@ -1604,6 +1604,11 @@ package body Sem_Ch3 is
if not Is_Constrained (T) then
null;
elsif Nkind (E) = N_Raise_Constraint_Error then
-- Aggregate is statically illegal. Place back in declaration.
Set_Expression (N, E);
Set_No_Initialization (N, False);
elsif T = Etype (E) then
null;
......
Markdown is supported
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