aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch3.adb
diff options
context:
space:
mode:
authorJavier Miranda <miranda@adacore.com>2022-03-20 11:36:25 +0000
committerPierre-Marie de Rodat <derodat@adacore.com>2022-05-17 08:25:42 +0000
commit6c72dc7d602f45d086a9651e623a4e68fa96fab6 (patch)
tree889b7c5db0e0e72d9d4d50b90237bc728ee54734 /gcc/ada/sem_ch3.adb
parentc30e5ab027a59a2ffcf7fb2d093ce2b64de712eb (diff)
downloadgcc-6c72dc7d602f45d086a9651e623a4e68fa96fab6.zip
gcc-6c72dc7d602f45d086a9651e623a4e68fa96fab6.tar.gz
gcc-6c72dc7d602f45d086a9651e623a4e68fa96fab6.tar.bz2
[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.
Diffstat (limited to 'gcc/ada/sem_ch3.adb')
0 files changed, 0 insertions, 0 deletions