]> gcc.gnu.org Git - gcc.git/commit - gcc/ada/sem_ch3.adb
[Ada] Do not create useless itype in Constrain_Access
authorEtienne Servais <servais@adacore.com>
Wed, 2 Feb 2022 14:18:29 +0000 (15:18 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 11 May 2022 08:53:20 +0000 (08:53 +0000)
commite6f7d5ff4f990c8f614c654353a3aa843f009349
tree446a81f5d5a992e00cace7970525d27da20cbd5c
parentdc9ecb41c8572c53bdcd86e73526e2a27bd3dff9
[Ada] Do not create useless itype in Constrain_Access

In the case of a constrained access definition for a record component we
are calling create_itype twice the former not being updated.  This leads
to a malformed node that crashes -gnatG when predicates are activated.
Instead of creating a default Itype for Desig_Subtype, create it with
the correct scope in each case.

gcc/ada/

* sem_ch3.adb (Constrain_Access): Call Desig_Subtype in each if
branch to avoid calling it twice.
gcc/ada/sem_ch3.adb
This page took 0.051109 seconds and 5 git commands to generate.