This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Solaris 8/SPARC libobjc bootstrap failure: SEGV in apply_args_size
- From: DJ Delorie <dj at redhat dot com>
- To: ro at TechFak dot Uni-Bielefeld dot DE
- Cc: gcc-gnats at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Thu, 4 Sep 2003 19:03:38 -0400
- Subject: Re: Solaris 8/SPARC libobjc bootstrap failure: SEGV in apply_args_size
- References: <200309042157.h84LvOV12190@padouk.TechFak.Uni-Bielefeld.DE>
Fixed as follows.
2003-09-04 DJ Delorie <dj@redhat.com>
* builtins.c (apply_args_size): Guard against a NULL cfun.
(expand_builtin_apply_args_1): Likewise.
(expand_builtin_apply_args_1): Likewise.
(expand_builtin_apply): Likewise.
Index: builtins.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/builtins.c,v
retrieving revision 1.248
diff -p -2 -r1.248 builtins.c
*** builtins.c 4 Sep 2003 03:17:42 -0000 1.248
--- builtins.c 4 Sep 2003 22:59:26 -0000
*************** apply_args_size (void)
*** 942,946 ****
/* The second value is the structure value address unless this is
passed as an "invisible" first argument. */
! if (targetm.calls.struct_value_rtx (TREE_TYPE (cfun->decl), 0))
size += GET_MODE_SIZE (Pmode);
--- 942,946 ----
/* The second value is the structure value address unless this is
passed as an "invisible" first argument. */
! if (targetm.calls.struct_value_rtx (cfun ? TREE_TYPE (cfun->decl) : 0, 0))
size += GET_MODE_SIZE (Pmode);
*************** expand_builtin_apply_args_1 (void)
*** 1117,1121 ****
int size, align, regno;
enum machine_mode mode;
! rtx struct_incoming_value = targetm.calls.struct_value_rtx (TREE_TYPE (cfun->decl), 1);
/* Create a block where the arg-pointer, structure value address,
--- 1117,1121 ----
int size, align, regno;
enum machine_mode mode;
! rtx struct_incoming_value = targetm.calls.struct_value_rtx (cfun ? TREE_TYPE (cfun->decl) : 0, 1);
/* Create a block where the arg-pointer, structure value address,
*************** expand_builtin_apply_args_1 (void)
*** 1125,1129 ****
/* Walk past the arg-pointer and structure value address. */
size = GET_MODE_SIZE (Pmode);
! if (targetm.calls.struct_value_rtx (TREE_TYPE (cfun->decl), 0))
size += GET_MODE_SIZE (Pmode);
--- 1125,1129 ----
/* Walk past the arg-pointer and structure value address. */
size = GET_MODE_SIZE (Pmode);
! if (targetm.calls.struct_value_rtx (cfun ? TREE_TYPE (cfun->decl) : 0, 0))
size += GET_MODE_SIZE (Pmode);
*************** expand_builtin_apply (rtx function, rtx
*** 1212,1216 ****
rtx old_stack_level = 0;
rtx call_fusage = 0;
! rtx struct_value = targetm.calls.struct_value_rtx (TREE_TYPE (cfun->decl), 0);
#ifdef POINTERS_EXTEND_UNSIGNED
--- 1212,1216 ----
rtx old_stack_level = 0;
rtx call_fusage = 0;
! rtx struct_value = targetm.calls.struct_value_rtx (cfun ? TREE_TYPE (cfun->decl) : 0, 0);
#ifdef POINTERS_EXTEND_UNSIGNED