This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Committed, obvious reload1.c: Fix g77.f-torture/execute/970625-2.fon mmix-knuth-mmixware
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 13 Aug 2002 20:51:35 -0400 (EDT)
- Subject: Committed, obvious reload1.c: Fix g77.f-torture/execute/970625-2.fon mmix-knuth-mmixware
This fixes
FAIL: g77.f-torture/execute/970625-2.f compilation, -O1
for mmix-knuth-mmixware. The error message is:
x/gcc/testsuite/g77.f-torture/execute/970625-2.f: In subroutine `functionprogram':
x/gcc/testsuite/g77.f-torture/execute/970625-2.f:74: internal compiler error:
RTL flag check: REG_FUNCTION_VALUE_P used with unexpected rtx code
`mem' in reload_cse_simplify, at reload1.c:8047
The fix seems obvious enough, considering that rtl.h says that
REG_FUNCTION_VALUE_P is only valid for REG, and that all other
uses of REG_FUNCTION_VALUE_P in reload1.c first check for REG.
Committed; tested mmix-knuth-mmixware, bootstrapped and checked
i686-pc-linux-gnu, no new regressions.
* reload1.c (reload_cse_simplify): Before checking
REG_FUNCTION_VALUE_P, check REG_P.
Index: reload1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/reload1.c,v
retrieving revision 1.351
diff -p -c -r1.351 reload1.c
*** reload1.c 30 Jul 2002 16:42:05 -0000 1.351
--- reload1.c 12 Aug 2002 10:12:09 -0000
*************** reload_cse_simplify (insn, testreg)
*** 8044,8050 ****
{
if (! reload_cse_noop_set_p (part))
break;
! if (REG_FUNCTION_VALUE_P (SET_DEST (part)))
{
if (value)
break;
--- 8044,8051 ----
{
if (! reload_cse_noop_set_p (part))
break;
! if (REG_P (SET_DEST (part))
! && REG_FUNCTION_VALUE_P (SET_DEST (part)))
{
if (value)
break;
brgds, H-P