trans.c (establish_gnat_vms_condition_handler): Clear DECL_CONTEXT.
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 7 Apr 2009 09:57:06 +0000 (09:57 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 7 Apr 2009 09:57:06 +0000 (09:57 +0000)
* gcc-interface/trans.c (establish_gnat_vms_condition_handler): Clear
DECL_CONTEXT.
(Subprogram_Body_to_gnu): Fix pasto.

From-SVN: r145661

gcc/ada/ChangeLog
gcc/ada/gcc-interface/trans.c

index 9dbf5a51f91aec6ae3cbdcf2e5e6dcb1462108c5..07590027b671d9eb7b3db6210e4290d4ab63df79 100644 (file)
@@ -1,3 +1,9 @@
+2009-04-07  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Clear
+       DECL_CONTEXT.
+       (Subprogram_Body_to_gnu): Fix pasto.
+
 2009-04-07  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gcc-interface/gigi.h (standard_datatypes): Remove ADT_void_type_decl.
index 96e7c80f659e7b686a9a3523861c02cf8381e17b..ec3ec31274ab629ee122cf8e76797ce176bba064 100644 (file)
@@ -2123,6 +2123,9 @@ establish_gnat_vms_condition_handler (void)
                                                         ptr_void_type_node,
                                                         NULL_TREE),
                               NULL_TREE, 0, 1, 1, 0, Empty);
+
+      /* ??? DECL_CONTEXT shouldn't have been set because of DECL_EXTERNAL.  */
+      DECL_CONTEXT (gnat_vms_condition_handler_decl) = NULL_TREE;
     }
 
   /* Do nothing if the establish builtin is not available, which might happen
@@ -2242,7 +2245,8 @@ Subprogram_Body_to_gnu (Node_Id gnat_node)
      this happens.  The foreign or exported condition is expected to satisfy
      all the constraints.  */
   if (TARGET_ABI_OPEN_VMS
-      && (Has_Foreign_Convention (gnat_node) || Is_Exported (gnat_node)))
+      && (Has_Foreign_Convention (gnat_subprog_id)
+         || Is_Exported (gnat_subprog_id)))
     establish_gnat_vms_condition_handler ();
 
   process_decls (Declarations (gnat_node), Empty, Empty, true, true);