[Ada] Crash freezing declaration that will raise constraint error
When the compiler is built with assertions enabled and processes the
following declarations:
type Vector_Boolean_Array is array (1 .. 10) of Boolean;
O2 : constant Vector_Boolean_Array := [for J in 2 => True];
The expression is rewritten by the frontend with an N_Raise_CE node,
which leads to an assertion error at the freezing point of the object
declaration.
gcc/ada/
* freeze.adb (Freeze_Entity): Protect the call to
Declaration_Node against entities of expressions replaced by the
frontend with an N_Raise_CE node.