This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Assigning incorrect variable
- From: Sohail Somani <sohail at sohailsomani dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 29 Dec 2004 15:37:13 -0800
- Subject: Assigning incorrect variable
To fix http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19128. Seems to work
OK. I ran make check-ada though ada from cvs seems to be failing and
hanging on one of the tests so the same tests fail/hang with this patch.
Sohail
PS: Please CC me, I'm not on the list.
Index: trans.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/ada/trans.c,v
retrieving revision 1.87
diff -u -3 -p -r1.87 trans.c
--- trans.c 23 Dec 2004 13:02:32 -0000 1.87
+++ trans.c 29 Dec 2004 07:17:07 -0000
@@ -3546,7 +3546,7 @@ gnat_to_gnu (Node_Id gnat_node)
are doing a call, pass that target to the call. */
if (TYPE_RETURNS_BY_TARGET_PTR_P (gnu_subprog_type)
&& Nkind (Expression (gnat_node)) == N_Function_Call)
- gnu_result = call_to_gnu (Expression (gnat_node),
+ gnu_ret_val = call_to_gnu (Expression (gnat_node),
&gnu_result_type, gnu_lhs);
else