In the case where the tyoe of the formal has a predicate, the compiler
generates a freeze node for the actual subtype of the formal that is
placed just before the declaration of that subtype.  No big deal, but
awkward enough as to warrant a correction.  No functional changes.

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

2019-10-10  Eric Botcazou  <ebotca...@adacore.com>

gcc/ada/

        * sem_ch6.adb (Set_Actual_Subtypes): Put the freeze node of the
        actual subtype after its declaration when the type of the formal
        has a predicate.
--- gcc/ada/sem_ch6.adb
+++ gcc/ada/sem_ch6.adb
@@ -12038,7 +12038,7 @@ package body Sem_Ch6 is
             --  predicate may come from an explicit aspect of be inherited.
 
             elsif Has_Predicates (T) then
-               Insert_List_Before_And_Analyze (Decl,
+               Insert_List_After_And_Analyze (Decl,
                  Freeze_Entity (Defining_Identifier (Decl), N));
             end if;
 

Reply via email to