* trans.c (gnat_to_gnu) <N_Return_Statement>: Set gnu_result
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 15 Mar 2005 19:21:36 +0000 (19:21 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 15 Mar 2005 19:21:36 +0000 (19:21 +0000)
to NULL_TREE on entry.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96528 138bc75d-0d04-0410-961f-82ee72b054a4

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

index fff1d35..7d2eba4 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 9bcc45e..7e64855 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