This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with function.c change
- To: mark at codesourcery dot com
- Subject: Re: Problem with function.c change
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Fri, 12 Nov 1999 20:54:29 -0700
- cc: gcc-bugs at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <199911130313.TAA15970@adsl-206-170-148-33.dsl.snfc21.pacbell.net>
you write:
>
> Your recent changes (1.133 -> 1.135) to function.c seem to be somehow
> causing some problems. Compile this test-case (condensed from the C++
> regression test-suite):
[ ... ]
> The problem is (somehow) that DECL_RESULT is (reg/i:SI 0 eax), but
> hard_function_value returns (reg:SI 0 eax). I don't know why this
> causes problems, but it does.
The flow code uses that bit to mark the hard register holding the return
value as live.
* function.c (diddle_return_value): Set REG_FUNCTION_VALUE_P as
needed.
Index: function.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/function.c,v
retrieving revision 1.135
diff -c -3 -p -r1.135 function.c
*** function.c 1999/11/12 07:38:32 1.135
--- function.c 1999/11/13 03:53:27
*************** diddle_return_value (code)
*** 6212,6217 ****
--- 6212,6218 ----
register in the USE/CLOBBER insn. */
return_reg = hard_function_value (TREE_TYPE (decl_result),
current_function_decl);
+ REG_FUNCTION_VALUE_P (return_reg) = 1;
emit_insn (gen_rtx_fmt_e (code, VOIDmode, return_reg));
}
else if (GET_CODE (return_reg) == PARALLEL)