Richard Guenther <[EMAIL PROTECTED]> wrote:

> I get a strange ICE if building (not bootstrapping) mainline with
> current 3.4 branch with CFLAGS="-g":
>
> /tmp/gcc-obj-checking/gcc/xgcc -B/tmp/gcc-obj-checking/gcc/
> -B/i686-pc-linux-gnu/bin/ -B/i686-pc-linux-gnu/lib/ -isystem
> /i686-pc-linux-gnu/include -isystem /i686-pc-linux-gnu/sys-include -c
> -DHAVE_CONFIG_H -O2 -g -I.
> -I/net/alwazn/home/rguenth/src/gcc/gcc/libiberty/../include  -W -Wall
> -Wtraditional -pedantic
> /net/alwazn/home/rguenth/src/gcc/gcc/libiberty/sort.c -o sort.o
> /net/alwazn/home/rguenth/src/gcc/gcc/libiberty/sort.c: In function
> 'sort_pointers':
> /net/alwazn/home/rguenth/src/gcc/gcc/libiberty/sort.c:51: internal
> compiler error: in insert_aux, at tree-ssa-pre.c:1624
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
>
> So, this is gcc 3.4.4 miscompiling HEAD with -g such that the built
> compiler ICEs as above.
>
> gcc-3.4 (GCC) 3.4.4 20050112 (prerelease)
>
> Is this even worth entering into the bug database?

Yes, it is a miscompilation of GCC 3.4 which we should fix because we still
maintain GCC. Moreover, it is possible that the same bug is latent in HEAD.

> I guess nobody will do a build with just -g.

That does not matter. The bug could trigger with different code.

> What would be the appropriate
> testcase?


First, preprocess the sort.c above as a testcase for the miscompilation.
Then you'd need to find out which file is miscompiled. It is possible that
it is tree-ssa-pre so that would be the first thing to check (e.g. recompile
only that file without -g, relink xgcc, and try running sort.i to see if it
still ICEs). After that, you could try to find out which function is being
miscompiled and compare the assembly / RTL dumps.

A bug in Bugzilla would probably have a standalone (preprocessed) copy of
the function being miscompiled and a diff of the assembly files showing the
miscompilation.

Others are surely more expert than me at analyzing this kind of issues, so
maybe they have better solutions.
-- 
Giovanni Bajo

Reply via email to