This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: build fix for SH
- From: amylaar at spamcop dot net (Joern Rennecke)
- To: bje at au1 dot ibm dot com (Ben Elliston)
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 8 Oct 2004 01:44:27 +0100 (BST)
- Subject: Re: build fix for SH
> 2004-09-30 Ben Elliston <bje@au.ibm.com>
>
> * lcm.c (optimize_mode_switching): Update to use EDGE_SUCC and
> FOR_EACH_EDGE macros.
Now it falls over building newlib:
/swbuild/nightly/2004-10-07/sh-elf/gcc/xgcc -B/swbuild/nightly/2004-10-07/sh-elf
/gcc/ -nostdinc -B/swbuild/nightly/2004-10-07/sh-elf/sh-elf/m2a/newlib/ -isystem
/swbuild/nightly/2004-10-07/sh-elf/sh-elf/m2a/newlib/targ-include -isystem /swb
uild/nightly/2004-10-07/srcw/newlib/libc/include -B/usr/local/sh-elf/bin/ -B/usr
/local/sh-elf/lib/ -isystem /usr/local/sh-elf/include -isystem /usr/local/sh-elf
/sys-include -L/swbuild/nightly/2004-10-07/sh-elf/ld -m2a -DPACKAGE=\"newlib\"
-DVERSION=\"1.12.0\" -I. -I../../../../../../srcw/newlib/libm/math -I../../../
../../../srcw/newlib/libm/math/../common -O2 -DHAVE_GETTIMEOFDAY -fno-builtin
-O2 -g -O2 -O2 -g -O2 -m2a -c ../../../../../../srcw/newlib/libm/math/e_scalb
.c
../../../../../../srcw/newlib/libm/math/e_scalb.c: In function '__ieee754_scalb'
:
../../../../../../srcw/newlib/libm/math/e_scalb.c:53: internal compiler error: S
egmentation fault
>
> Index: lcm.c
> ===================================================================
> RCS file: /home/bje/gcc-cvs/gcc/gcc/lcm.c,v
> retrieving revision 1.66
> diff -u -p -r1.66 lcm.c
> --- lcm.c 28 Sep 2004 07:59:47 -0000 1.66
> +++ lcm.c 29 Sep 2004 23:35:28 -0000
> @@ -1025,17 +1025,18 @@ optimize_mode_switching (FILE *file)
> exit block, so that we can note that there NORMAL_MODE is supplied /
> required. */
> edge eg;
> - post_entry = split_edge (ENTRY_BLOCK_PTR->succ);
> + edge_iterator ei;
> + post_entry = split_edge (EDGE_SUCC (ENTRY_BLOCK_PTR, 0));
> /* The only non-call predecessor at this stage is a block with a
> fallthrough edge; there can be at most one, but there could be
> none at all, e.g. when exit is called. */
> - for (pre_exit = 0, eg = EXIT_BLOCK_PTR->pred; eg; eg = eg->pred_next)
> + pre_exit = 0;
> + FOR_EACH_EDGE (eg, ei, EXIT_BLOCK_PTR->preds)
> if (eg->flags & EDGE_FALLTHRU)
> {
> regset live_at_end = eg->src->global_live_at_end;
>
> - if (pre_exit)
> - abort ();
> + gcc_assert (!pre_exit);
> pre_exit = split_edge (eg);
The container of ei is destroyed here.
> COPY_REG_SET (pre_exit->global_live_at_start, live_at_end);
> COPY_REG_SET (pre_exit->global_live_at_end, live_at_end);
Breaking the loop here is trivial, still I suppose I better not post new
patches till the ST Microelectronics assignment paperwork is done.