trans.c (gnat_to_gnu): Set gnu_result to NULL_TREE on entry.
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 15 Mar 2005 19:21:36 +0000 (19:21 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 15 Mar 2005 19:21:36 +0000 (19:21 +0000)
* trans.c (gnat_to_gnu) <N_Return_Statement>: Set gnu_result
to NULL_TREE on entry.

From-SVN: r96528

gcc/ada/ChangeLog
gcc/ada/trans.c

index fff1d35d6b058e66692d0259141f9aa9ee7e9853..7d2eba4c778dd644dd6f95685741f97e76f99030 100644 (file)
@@ -1,3 +1,8 @@
+2005-03-15  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * trans.c (gnat_to_gnu) <N_Return_Statement>: Set gnu_result
+       to NULL_TREE on entry.
+
 2005-03-15  Robert Dewar  <dewar@adacore.com>
 
        * system-unixware.ads, system-linux-ia64.ads, system-freebsd-x86.ads,
index 9bcc45e5e6368ce6e32113750b4dda404df387ac..7e6485557a47b011082d7ff94171b7932a176b9c 100644 (file)
@@ -3500,6 +3500,8 @@ gnat_to_gnu (Node_Id gnat_node)
        tree gnu_ret_val = NULL_TREE;
        /* The place to put the return value.  */
        tree gnu_lhs;
+       /* Avoid passing error_mark_node to RETURN_EXPR.  */
+       gnu_result = NULL_TREE;
 
        /* If we are dealing with a "return;" from an Ada procedure with
           parameters passed by copy in copy out, we need to return a record