This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix alpha and arm bootstrap failures
- From: Roger Sayle <roger at www dot eyesopen dot com>
- To: Brad Lucier <lucier at math dot purdue dot edu>
- Cc: Richard Earnshaw <rearnsha at arm dot com>, <gcc-patches at gcc dot gnu dot org>, Kazu Hirata <kazu at cs dot umass dot edu>
- Date: Tue, 25 Feb 2003 16:53:12 -0700 (MST)
- Subject: Re: [PATCH] Fix alpha and arm bootstrap failures
> Well, it bombs a bit earlier ;-). This is at the end of the
> stage1 build:
>
> /export/home/lucier/programs/gcc/objdir/gcc/xgcc -B/export/home/lucier/programs/gcc/objdir/gcc/ -B/usr/local/gcc-3.4/alphaev6-unknown-linux-gnu/bin/ -B/usr/local/gcc-3.4/alphaev6-unknown-linux-gnu/lib/ -isystem /usr/local/gcc-3.4/alphaev6-unknown-linux-gnu/include -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/config -I../../gcc/../include -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-unit-at-a-time \
> -c ../../gcc/crtstuff.c -DCRT_BEGIN \
> -o crtbegin.o
> ../../gcc/crtstuff.c: In function `__do_global_dtors_aux':
> ../../gcc/crtstuff.c:282: warning: passing arg 1 of `__deregister_frame_info' discards qualifiers from pointer target type
> ../../gcc/crtstuff.c: In function `frame_dummy':
> ../../gcc/crtstuff.c:318: warning: passing arg 1 of `__register_frame_info' discards qualifiers from pointer target type
> /usr/include/bits/string2.h: In function `__strsep_1c':
> /usr/include/bits/string2.h:1114: internal compiler error: Segmentation fault
Doh! Sorry. Trying to fix failures on platforms you can't bootstrap
yourself is a hazardous undertaking. Hopefully, you might get a bit
further with the revision below. We ended up calling copy_rtx on a
NULL pointer without checking (in optabs.c). Sorry once again.
Index: calls.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/calls.c,v
retrieving revision 1.258
diff -c -3 -p -r1.258 calls.c
*** calls.c 23 Feb 2003 22:19:39 -0000 1.258
--- calls.c 25 Feb 2003 20:27:06 -0000
*************** expand_call (exp, target, ignore)
*** 3105,3111 ****
}
else
{
- rtx note = 0;
rtx temp = gen_reg_rtx (GET_MODE (valreg));
/* Mark the return value as a pointer if needed. */
--- 3105,3110 ----
*************** expand_call (exp, target, ignore)
*** 3113,3136 ****
mark_reg_pointer (temp,
TYPE_ALIGN (TREE_TYPE (TREE_TYPE (exp))));
- /* Construct an "equal form" for the value which mentions all the
- arguments in order as well as the function name. */
- for (i = 0; i < num_actuals; i++)
- note = gen_rtx_EXPR_LIST (VOIDmode,
- args[i].initial_value, note);
- note = gen_rtx_EXPR_LIST (VOIDmode, funexp, note);
-
insns = get_insns ();
end_sequence ();
! if (flags & ECF_PURE)
! note = gen_rtx_EXPR_LIST (VOIDmode,
! gen_rtx_USE (VOIDmode,
! gen_rtx_MEM (BLKmode,
! gen_rtx_SCRATCH (VOIDmode))),
! note);
!
! emit_libcall_block (insns, temp, valreg, note);
valreg = temp;
}
--- 3112,3121 ----
mark_reg_pointer (temp,
TYPE_ALIGN (TREE_TYPE (TREE_TYPE (exp))));
insns = get_insns ();
end_sequence ();
! emit_libcall_block (insns, temp, valreg, NULL_RTX);
valreg = temp;
}
*************** emit_library_call_value_1 (retval, orgfu
*** 4091,4099 ****
}
else
{
- rtx note = 0;
rtx temp;
- int i;
if (GET_CODE (valreg) == PARALLEL)
{
--- 4076,4082 ----
*************** emit_library_call_value_1 (retval, orgfu
*** 4104,4126 ****
temp = gen_reg_rtx (GET_MODE (valreg));
- /* Construct an "equal form" for the value which mentions all the
- arguments in order as well as the function name. */
- for (i = 0; i < nargs; i++)
- note = gen_rtx_EXPR_LIST (VOIDmode, argvec[i].value, note);
- note = gen_rtx_EXPR_LIST (VOIDmode, fun, note);
-
insns = get_insns ();
end_sequence ();
! if (flags & ECF_PURE)
! note = gen_rtx_EXPR_LIST (VOIDmode,
! gen_rtx_USE (VOIDmode,
! gen_rtx_MEM (BLKmode,
! gen_rtx_SCRATCH (VOIDmode))),
! note);
!
! emit_libcall_block (insns, temp, valreg, note);
valreg = temp;
}
--- 4087,4096 ----
temp = gen_reg_rtx (GET_MODE (valreg));
insns = get_insns ();
end_sequence ();
! emit_libcall_block (insns, temp, valreg, NULL_RTX);
valreg = temp;
}
Index: optabs.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/optabs.c,v
retrieving revision 1.164
diff -c -3 -p -r1.164 optabs.c
*** optabs.c 11 Feb 2003 19:34:08 -0000 1.164
--- optabs.c 25 Feb 2003 20:27:08 -0000
*************** emit_libcall_block (insns, target, resul
*** 3426,3432 ****
last = emit_move_insn (target, result);
if (mov_optab->handlers[(int) GET_MODE (target)].insn_code
!= CODE_FOR_nothing)
! set_unique_reg_note (last, REG_EQUAL, copy_rtx (equiv));
else
{
/* Remove any existing REG_EQUAL note from "last", or else it will
--- 3426,3435 ----
last = emit_move_insn (target, result);
if (mov_optab->handlers[(int) GET_MODE (target)].insn_code
!= CODE_FOR_nothing)
! {
! if (equiv != NULL_RTX)
! set_unique_reg_note (last, REG_EQUAL, copy_rtx (equiv));
! }
else
{
/* Remove any existing REG_EQUAL note from "last", or else it will
Roger
--
Roger Sayle, E-mail: roger at eyesopen dot com
OpenEye Scientific Software, WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road, Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507. Fax: (+1) 505-473-0833