This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: gcc-ss-20000807: Internal error on hppa2.0n-hp-hpux11.00
- To: gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Subject: Re: gcc-ss-20000807: Internal error on hppa2.0n-hp-hpux11.00
- From: John David Anglin <dave dot anglin at nrc dot ca>
- Date: Thu, 10 Aug 2000 23:43:37 -0400
- Organization: National Research Council of Canada
- Reply-To: dave dot anglin at nrc dot ca
> +#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))
Jakub, there is likely a problem if i < 0. The same may be true if i + k >= stored_args_map->n_bits. I ran a complete bootstrap and check with my
original patch <http://gcc.gnu.org/ml/gcc-patches/2000-08/msg00214.html>
with some debugging code installed and there were no out of range values.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
Title: Re: gcc-ss-20000807: Internal error on hppa2.0n-hp-hpux11.00
This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: gcc-ss-20000807: Internal error on hppa2.0n-hp-hpux11.00
- To: jakub at redhat dot com
- Subject: Re: gcc-ss-20000807: Internal error on hppa2.0n-hp-hpux11.00
- From: Rodney Brown <rdb at localhost>
- Date: Thu, 10 Aug 2000 23:23:22 +1000 (EST)
- Cc: <girod at stybba dot ntc dot nokia dot com>, gcc at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org, law at cygnus dot com
- Reply-To: RDBrown at mira dot net, RodneyBrown at mynd dot com
hppa2.0-hp-hpux10.20 --with-gnu-as
Jakub, with your patch, the failure still happened as shown below.
The enclosed patch, identical to yours in the first group, is currently
running the gcc testsuite (ie has successfully bootstrapped).
I should have replaced the assignment of `high' back in the for loop.
That part needs a slightly better rationale than getting
values of low and high that `work' too.
--- gcc/calls.c.o>
Transfer interrupted!
calls.c Thu Aug 10 15:00:44 2000
@@ -1960,9 +1960,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))
@@ -2015,7 +2026,11 @@ check_sibcall_argument_overlap (insn, ar
break;
low = arg->offset.constant;
- for (high = low + arg->size.constant; low < high; low++)
+#ifdef ARGS_GROW_DOWNWARD
+ low += stored_args_map->n_bits;
+#endif
+ high = low + arg->size.constant;
+ for (; low < high; low++)
SET_BIT (stored_args_map, low);
return insn != NULL_RTX;
}
stage1/xgcc -Bstage1/ -B/usr/local/hppa2.0-hp-hpux10.20/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 `/devel/span/rdb/src/egcs-20000807.obj/gcc'
stage1/cc1 c-decl.i -quiet -dumpbase c-decl.c -g -O2 -O2 -W -Wall -Wtraditional -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -pedantic -version -o c-decl.s
GNU C version 2.96 20000807 (experimental) (hppa2.0-hp-hpux10.20) compiled by GNU C version 2.95.2 19991024 (release).
../../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.
warning: Unable to find __d_pid symbol in object file.
warning: Suggest linking with /opt/langtools/lib/end.o.
warning: GDB will be unable to track shl_load/shl_unload calls
GNU C version 2.96 20000807 (experimental) (hppa2.0-hp-hpux10.20) compiled by GNU C version 2.95.2 19991024 (release).
Program received signal SIGSEGV, Segmentation fault.
0x32590c in check_sibcall_argument_overlap (insn=0x0, arg=0x7b03d208)
at ../../egcs-20000807/gcc/calls.c:2036
2036 SET_BIT (stored_args_map, low);
#0 0x32590c in check_sibcall_argument_overlap (insn=0x0, arg=0x7b03d208)
at ../../egcs-20000807/gcc/calls.c:2036
#1 0x327c78 in expand_call (exp=0x7acd0d80, target=0x0, ignore=0)
at ../../egcs-20000807/gcc/calls.c:2970
#2 0x162ca4 in expand_expr (exp=0x7acd0d80, target=0x0, tmode=VOIDmode,
modifier=EXPAND_NORMAL) at ../../egcs-20000807/gcc/expr.c:7087
#3 0x12bacc in expand_expr_stmt (exp=0x7acd0d80)
at ../../egcs-20000807/gcc/stmt.c:1867
#4 0x99c1c in expand_stmt_with_iterators_1 (stmt=0x7acd0d80, iter_list=0x0)
at ../../egcs-20000807/gcc/c-iterate.c:168
#5 0x99bd0 in iterator_expand (stmt=0x7acd0d80)
at ../../egcs-20000807/gcc/c-iterate.c:158
#6 0x3ab5c in yyparse () at c-parse.y:1626
#7 0xa04a8 in compile_file (name=0x7ae7db30 "")
at ../../egcs-20000807/gcc/toplev.c:2296
#8 0xa7f94 in main (argc=19, argv=0x7b03a588)
at ../../egcs-20000807/gcc/toplev.c:4774
2031 #else
2032 low = arg->offset.constant;
2033 high = low + arg->size.constant;
2034 #endif
2035 for (; low < high; low++)
2036 SET_BIT (stored_args_map, low);
2037 return insn != NULL_RTX;
2038 }
2039
2040 /* Generate all the code for a function call
(gdb) p low
$1 = -4
(gdb) p high
$2 = 0
(gdb) l 2020
2015 {
2016 int low, high;
2017
2018 if (insn == NULL_RTX)
2019 insn = get_insns ();
2020 else
2021 insn = NEXT_INSN (insn);
2022
2023 for (; insn; insn = NEXT_INSN (insn))
2024 if (INSN_P (insn) &&
(gdb) l
2025 check_sibcall_argument_overlap_1 (PATTERN (insn)))
2026 break;
2027
2028 #ifdef ARGS_GROW_DOWNWARD
2029 high = stored_args_map->n_bits + arg->offset.constant;
2030 low = high - arg->size.constant;
2031 #else
2032 low = arg->offset.constant;
2033 high = low + arg->size.constant;
2034 #endif
(gdb) p *arg
$3 = {tree_value = 0x7acd0d20, mode = SImode, value = 0x7aa0e5d0,
initial_value = 0x0, reg = 0x0, tail_call_reg = 0x0, unsignedp = 1,
partial = 0, pass_on_stack = 0, offset = {constant = -20, var = 0x0},
slot_offset = {constant = -20, var = 0x0}, size = {constant = 4, var = 0x0},
stack = 0x7aa0e5b0, stack_slot = 0x7aa0e5d0, save_area = 0x0,
aligned_regs = 0x0, n_aligned_regs = 0, alignment_pad = {constant = 0,
var = 0x0}}
(gdb) p *stored_args_map
$4 = {n_bits = 20, size = 1, bytes = 4, elms = {0}}
(gdb) c
Continuing.
Breakpoint 4, fatal (
msgid=0x1cbdc "Internal error: %s.\nPlease submit a full bug report.\nSee %s for instructions.") at ../../egcs-20000807/gcc/diagnostic.c:1279
1279 VA_START (ap, msgid);
(gdb) c
Continuing.
../../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.
Child process unexpectedly missing: No child processes.
[New process -1]
Program terminated with signal ?, Unknown signal.
The program no longer exists.