[Ada] Default_Initial_Condition check done after extended return with init
authorArnaud Charlet <charlet@adacore.com>
Mon, 4 May 2020 08:56:52 +0000 (04:56 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 6 Jul 2020 11:34:50 +0000 (07:34 -0400)
gcc/ada/

* par-ch6.adb (P_Return_Object_Declaration): Set
Has_Init_Expression flag.

gcc/ada/par-ch6.adb

index abf7d1052e34009a69dc90a27c0769020672739b..0821e68dde1ac0c410136b5d1d945559267d936b 100644 (file)
@@ -1856,6 +1856,7 @@ package body Ch6 is
       if Token = Tok_Colon_Equal then
          Scan; -- past :=
          Set_Expression (Decl_Node, P_Expression_No_Right_Paren);
+         Set_Has_Init_Expression (Decl_Node);
       end if;
 
       return Decl_Node;