diff options
author | Arnaud Charlet <charlet@adacore.com> | 2021-05-20 06:40:48 -0400 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-07-07 16:23:18 +0000 |
commit | 18b267aeeb126290355ec394fbc0f6a1fba1f340 (patch) | |
tree | 2c1f8d0f6e57455d4843d4e638621713893e8c5b /gcc | |
parent | 125bb16bece454843ca420fd033351d1a80976a4 (diff) | |
download | gcc-18b267aeeb126290355ec394fbc0f6a1fba1f340.zip gcc-18b267aeeb126290355ec394fbc0f6a1fba1f340.tar.gz gcc-18b267aeeb126290355ec394fbc0f6a1fba1f340.tar.bz2 |
[Ada] Front-end inlining and instantiations of UC
gcc/ada/
* sem_ch12.adb (Analyze_Subprogram_Instantiation): Mark Anon_Id
intrinsic before calling Analyze_Instance_And_Renamings because
this flag may be propagated to other nodes.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/sem_ch12.adb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index 1c8f64e..bf51ce9 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -5796,6 +5796,14 @@ package body Sem_Ch12 is Set_SPARK_Mode (Gen_Unit); end if; + -- Need to mark Anon_Id intrinsic before calling + -- Analyze_Instance_And_Renamings because this flag may be propagated + -- to other nodes. + + if Is_Intrinsic_Subprogram (Gen_Unit) then + Set_Is_Intrinsic_Subprogram (Anon_Id); + end if; + Analyze_Instance_And_Renamings; -- Restore SPARK_Mode from the context after analysis of the package @@ -5817,7 +5825,6 @@ package body Sem_Ch12 is -- not within the main unit. if Is_Intrinsic_Subprogram (Gen_Unit) then - Set_Is_Intrinsic_Subprogram (Anon_Id); Set_Is_Intrinsic_Subprogram (Act_Decl_Id); if Chars (Gen_Unit) = Name_Unchecked_Conversion then |