This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gcc-ss-20000807: Internal error on hppa2.0n-hp-hpux11.00


On Wed, Aug 09, 2000 at 11:50:27AM +0300, Marc Girod wrote:
> Hello!
> 
> I configure with:
> 
> $ ../egcs-20000807/configure  --enable-version-specific-runtime-libs --prefix=/tools/contrib/HP-UX/B.11.00/hppa2.0/packages/egcs --disable-shared --with-gnu-as --with-as=/tools/contrib/HP-UX/B.11.00/hppa2.0/bin/as
> 
> and run
> 
> $ make bootstrap
> [...]
> stage1/xgcc -Bstage1/ -B/tools/contrib/HP-UX/B.11.00/hppa2.0/packages/egcs/hppa2.0n-hp-hpux11.00/bin/ -c  -DIN_GCC    -W -Wall -Wtraditional -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -O2 -g -O2  -DHAVE_CONFIG_H    -I. -I../../egcs-20000807/gcc -I../../egcs-20000807/gcc/config -I../../egcs-20000807/gcc/../include ../../egcs-20000807/gcc/c-decl.c
> ../../egcs-20000807/gcc/c-decl.c: In function `builtin_function':
> ../../egcs-20000807/gcc/c-decl.c:3262: Internal error: Segmentation fault.
> Please submit a full bug report.
> See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
> make[2]: *** [c-decl.o] Error 1
> make[2]: Leaving directory `/tmp_mnt/tools/contrib/gen/src/gcc-build11ds/gcc'
> make[1]: *** [bootstrap] Error 2
> make[1]: Leaving directory `/tmp_mnt/tools/contrib/gen/src/gcc-build11ds/gcc'
> make: *** [bootstrap] Error 2
> 

Does a patch like this help?

2000-08-09  Jakub Jelinek  <jakub@redhat.com>

	* calls.c (check_sibcall_argument_overlap_1): Handle
	ARGS_GROW_DOWNWARD machines.
	(check_sibcall_argument_overlap): Likewise.

--- gcc/calls.c.jj	Wed Aug  2 21:34:07 2000
+++ gcc/calls.c	Wed Aug  9 11:55:33 2000
@@ -1963,9 +1963,20 @@ check_sibcall_argument_overlap_1 (x)
 		  current_function_internal_arg_pointer
 	       && GET_CODE (XEXP (XEXP (x, 0), 1)) == CONST_INT)
 	i = INTVAL (XEXP (XEXP (x, 0), 1));
+      else if (GET_CODE (XEXP (x, 0)) == MINUS
+	       && XEXP (XEXP (x, 0), 0) ==
+		  current_function_internal_arg_pointer
+	       && GET_CODE (XEXP (XEXP (x, 0), 1)) == CONST_INT)
+	i = -INTVAL (XEXP (XEXP (x, 0), 1));
       else
 	return 0;
 
+#ifdef ARGS_GROW_DOWNWARD
+      i += stored_args_map->n_bits;
+#endif
+      if (i < 0)
+        return 0;
+
       for (k = 0; k < GET_MODE_SIZE (GET_MODE (x)); k++)
 	if (i + k < stored_args_map->n_bits
 	    && TEST_BIT (stored_args_map, i + k))
@@ -2017,8 +2028,14 @@ check_sibcall_argument_overlap (insn, ar
 	check_sibcall_argument_overlap_1 (PATTERN (insn)))
       break;
 
+#ifdef ARGS_GROW_DOWNWARD
+  high = stored_args_map->n_bits + arg->offset.constant;
+  low = high - arg->size.constant;
+#else
   low = arg->offset.constant;
-  for (high = low + arg->size.constant; low < high; low++)
+  high = low + arg->size.constant;
+#endif
+  for (; low < high; low++)
     SET_BIT (stored_args_map, low);
   return insn != NULL_RTX;
 }


	Jakub

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]