exp_ch7.adb (Make_Transient_Block): if statement is within exception handler...
authorEd Schonberg <schonber@gnat.com>
Thu, 11 Oct 2001 23:50:31 +0000 (23:50 +0000)
committerGeert Bosch <bosch@gcc.gnu.org>
Thu, 11 Oct 2001 23:50:31 +0000 (01:50 +0200)
* exp_ch7.adb (Make_Transient_Block): if statement is within
exception handler, always use new transient scope to place Clean
procedure.

From-SVN: r46208

gcc/ada/ChangeLog
gcc/ada/exp_ch7.adb

index 889ac48015e014528e6e65f99846d3f9118cf622..16ecc43422fc3bf2763b07301214f3ba78e5925a 100644 (file)
@@ -1,3 +1,9 @@
+2001-10-11  Ed Schonberg <schonber@gnat.com>
+
+       * exp_ch7.adb (Make_Transient_Block): if statement is within 
+       exception handler, always use new transient scope to place Clean 
+       procedure.
+
 2001-10-11  Pascal Obry <obry@gnat.com>
 
        * Makefile.in:
index 3feba78ecd7a53e73d782c5994027961e8e79745..03e83603a1e8f2a7e90137bac3f06ecdb2d58413 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---                            $Revision: 1.245 $
+--                            $Revision$
 --                                                                          --
 --          Copyright (C) 1992-2001, Free Software Foundation, Inc.         --
 --                                                                          --
@@ -2404,6 +2404,7 @@ package body Exp_Ch7 is
    is
       Flist  : constant Entity_Id := Finalization_Chain_Entity (Current_Scope);
       Decls  : constant List_Id   := New_List;
+      Par    : constant Node_Id   := Parent (Action);
       Instrs : constant List_Id   := New_List (Action);
       Blk    : Node_Id;
 
@@ -2413,6 +2414,7 @@ package body Exp_Ch7 is
       if Uses_Sec_Stack (Current_Scope)
         and then No (Flist)
         and then Nkind (Action) /= N_Return_Statement
+        and then Nkind (Par) /= N_Exception_Handler
       then
 
          declare