]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Fix incorrect freezing with generic child unit
authorMarc Poulhiès <poulhies@adacore.com>
Mon, 28 Mar 2022 14:03:48 +0000 (16:03 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 18 May 2022 08:40:59 +0000 (08:40 +0000)
commit5488c78c836ca71330bc69247bf75aa14d9d2603
treeec6f424a8977ca67fe70e99168bcd7034c2026e3
parentbf7143f736d66051083a6f5d569dc85cfad7e7f6
[Ada] Fix incorrect freezing with generic child unit

The Analyze_Associations.Check_Generic_Parent function was using an
incorrect node as the instanciation node for the actual, possibly
leading to incorrect freeze node being created (and later crashing in
gigi). Using Get_Unit_Instantiation_Node fixes the issue.

gcc/ada/

* sem_ch12.adb (Check_Generic_Parent): Use
Get_Unit_Instantiation_Node instead of Next.
gcc/ada/sem_ch12.adb