From: Arnaud Charlet Date: Mon, 2 Nov 2020 11:21:45 +0000 (-0500) Subject: [Ada] Fix tree for expanded instantiations corresponding to formal packages X-Git-Tag: basepoints/gcc-12~2793 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78287696dc5f788b28f8541c93809e002f722f81;p=thirdparty%2Fgcc.git [Ada] Fix tree for expanded instantiations corresponding to formal packages gcc/ada/ * sem_ch12.adb (Instantiate_Object): Consistently use New_Copy_Tree instead of New_Copy. --- diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index 20a00d7be9e6..6a32bdca1cab 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -11567,7 +11567,7 @@ package body Sem_Ch12 is -- Use default to construct declaration if Present (Subt_Mark) then - Def := New_Copy (Subt_Mark); + Def := New_Copy_Tree (Subt_Mark); else pragma Assert (Present (Acc_Def)); Def := New_Copy_Tree (Acc_Def);