]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Use Insert_Actions...
authorEd Schonberg <schonberg@adacore.com>
Thu, 31 Jul 2008 10:27:42 +0000 (12:27 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Thu, 31 Jul 2008 10:27:42 +0000 (12:27 +0200)
2008-07-31  Ed Schonberg  <schonberg@adacore.com>

* exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Use
Insert_Actions to place the pointer declaration in the code, rather
than Insert_Before_And_Analyze, so that insertions of temporaries are
kept in the proper order when transient scopes are present.

From-SVN: r138386

gcc/ada/exp_ch6.adb

index cddc021024132ffa37b5f818aca6f66101cbe172..3e3c10db2b5ce6b20361e6a0734753c781a11e29 100644 (file)
@@ -5496,7 +5496,7 @@ package body Exp_Ch6 is
       if Is_Constrained (Underlying_Type (Result_Subt)) then
          Insert_After_And_Analyze (Object_Decl, Ptr_Typ_Decl);
       else
-         Insert_Before_And_Analyze (Object_Decl, Ptr_Typ_Decl);
+         Insert_Action (Object_Decl, Ptr_Typ_Decl);
       end if;
 
       --  Finally, create an access object initialized to a reference to the