This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: 20000717 ICE compiling gcc/tree.c on hppa2.0-hp-hpux10.20.gnu.org
- To: dave at hiauly1 dot hia dot nrc dot ca (John David Anglin)
- Subject: Re: 20000717 ICE compiling gcc/tree.c on hppa2.0-hp-hpux10.20.gnu.org
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Sat, 29 Jul 2000 00:20:31 -0400 (EDT)
- Cc: gcc-bugs at gcc dot gnu dot org, rdbrown at mira dot net
>
> > (gdb) p low
> > $4 = -20
>
> The relevant code in calls.c (check_sibcall_argument_overlap) is
>
> low = arg->offset.constant;
> for (high = low + arg->size.constant; low < high; low++)
> SET_BIT (stored_args_map, low);
>
> The second argument of SET_BIT must be non-negative. Is the value
> of `low' reasonable for the hppa? If so, check_sibcall_argument_overlap
> needs fixing to handle negative offsets.
>
> The code for check_sibcall_argument_overlap is new. It was added by
> Jakub Jelinek on July 17.
On the pa, ARGS_GROW_DOWNWARD is defined. It would appear the stored_args_map
is not being managed properly in this case. I tried changing the above
code to
#ifdef ARGS_GROW_DOWNWARD
/* stack_slot is negative, but we want to index stored_args_map
with positive values. */
high = -arg->offset.constant + 1;
low = high - arg->size.constant;
#else
low = arg->offset.constant;
high = low + arg->size.constant;
#endif
for (i = low; i < high; i++)
SET_BIT (stored_args_map, i);
but this isn't correct or the complete solution. With this patch, the
build goes a little further but fails here:
stage1/xgcc -B/usr/local/hppa1.1-hp-hpux10.20/bin/ -Bstage1/ -c -DIN_GCC -W -Wall -Wtraditional -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -g -O3 -DHAVE_CONFIG_H -I. -I../../gcc -I../../gcc/config -I../../gcc/../include ../../gcc/expmed.c
xgcc: Internal error: Bus error (program cc1)
The bus error occured at the `sbitmap_free (stored_args_map)' call in
calls.c which simply free's the stored_args_map. I would guess the
malloc'd data is getting corrupted.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)