[Ada] Fix incorrect freezing with generic child unit

Pierre-Marie de Rodat derodat@adacore.com
Wed May 18 08:43:02 GMT 2022


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.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* sem_ch12.adb (Check_Generic_Parent): Use
	Get_Unit_Instantiation_Node instead of Next.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 1042 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20220518/6a1420ae/attachment.bin>


More information about the Gcc-patches mailing list