This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/14671] [3.3/3.4 regression] caller-save.c:491: internal compiler error: Segmentation fault
- From: "dave at hiauly1 dot hia dot nrc dot ca" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 May 2004 17:31:29 -0000
- Subject: [Bug bootstrap/14671] [3.3/3.4 regression] caller-save.c:491: internal compiler error: Segmentation fault
- References: <20040321182857.14671.danglin@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From dave at hiauly1 dot hia dot nrc dot ca 2004-05-27 17:31 -------
Subject: Re: [3.3/3.4 regression] caller-save.c:491: int
> > I can't duplicate the ICE using the gmp_test4.ii testcase. What were
> > the compilation options that triggered it? They are not in the PR.
> > I have tried -O[1-3] with
>
> Just -O2 -funroll-loops.
I did a new build with the patch below. With this patch, I still can't
duplicate the ICE:
dave@hiamlx:~/gcc_test> /home/dave/gnu/gcc-3.4/objdir/gcc/g++ -B/home/dave/gnu/gcc-3.4/objdir/gcc/ -S -O2 -funroll-loops gmp_test4.ii
dave@hiamlx:~/gcc_test> /home/dave/gnu/gcc-3.4/objdir/gcc/g++ -B/home/dave/gnu/gcc-3.4/objdir/gcc/ -S -O2 -v
Reading specs from /home/dave/gnu/gcc-3.4/objdir/gcc/specs
Configured with: ../gcc/configure --with-gnu-as --with-as=/usr/local/bin/as --with-gnu-ld --with-ld=/usr/local/bin/ld --enable-shared --disable-nls --prefix=/home/dave/opt/gnu/gcc/gcc-3.3.4 --enable-threads=posix --enable-languages=c++ --disable-checking --enable-__cxa_atexit --disable-libunwind-exceptions
Thread model: posix
gcc version 3.3.4 20040526 (prerelease)
I'm retrying with an unmodified tree and the "-O2 -funroll-loops" option.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
Index: alias.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/alias.c,v
retrieving revision 1.181.2.5
diff -u -3 -p -r1.181.2.5 alias.c
--- alias.c 8 May 2004 21:52:42 -0000 1.181.2.5
+++ alias.c 27 May 2004 17:12:34 -0000
@@ -2786,10 +2786,7 @@ init_alias_analysis ()
reg_seen = (char *) xmalloc (reg_base_value_size);
if (! reload_completed && flag_unroll_loops)
{
- /* ??? Why are we realloc'ing if we're just going to zero it? */
- alias_invariant = (rtx *)xrealloc (alias_invariant,
- reg_base_value_size * sizeof (rtx));
- memset ((char *)alias_invariant, 0, reg_base_value_size * sizeof (rtx));
+ alias_invariant = ggc_calloc (reg_base_value_size, sizeof (rtx));
alias_invariant_size = reg_base_value_size;
}
@@ -2985,7 +2982,6 @@ end_alias_analysis ()
reg_base_value_size = 0;
if (alias_invariant)
{
- free (alias_invariant);
alias_invariant = 0;
alias_invariant_size = 0;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14671