Gentoo Archives: gentoo-dev

From: Philipp Hasse <dream-weaver@×××.net>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] gcc-3.3.3-r6 internal compiler error while compiling media-sound/lame
Date: Tue, 24 Aug 2004 08:09:05
Message-Id: 006c01c489b1$9e422c10$0202a8c0@mrpink
1 Hi,
2
3 I recently compiled lame-3.96 and the compilation aborted with:
4
5 gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I. -I../libmp3lame -I.. -Wall
6 -pipe -pipe -march=i486 -mc3 -mmmx -m3dnow -malign-double -maccumulate-outg
7 oing-args -O3 -fomit-frame-pointer -ffast-math -falign-functions=4 -funroll-
8 loops -fprefetch-loop-arrays -fforce-addr -MT layer2.lo -MD -MP -MF
9 .deps/layer2.Tpo -c layer2.c -fPIC -DPIC -o .libs/layer2.o
10 layer2.c: In function `init_layer2':
11 layer2.c:70: internal compiler error: Floating point exception
12 Please submit a full bug report,
13 with preprocessed source if appropriate.
14 See <URL:http://bugs.gentoo.org/> for instructions.
15 Preprocessed source stored into /var/tmp/portage/lame-3.96/temp/ccLmjNol.out
16 file, please attach this to your bugreport.
17 make[2]: *** [layer2.lo] Fehler 1
18 make[2]: Leaving directory
19 `/var/tmp/portage/lame-3.96/work/lame-3.96/mpglib'
20 make[1]: *** [all-recursive] Fehler 1
21 make[1]: Leaving directory `/var/tmp/portage/lame-3.96/work/lame-3.96'
22 make: *** [all] Fehler 2
23
24 I did some tests on it and found out that this abortion is caused by the
25 following combination of CFLAGS:
26 - -march=i486 (or -march=c3 as gcc uses i486 for a C3)
27 - -O2 (or higher)
28 - -m3dnow
29 - -fprefetch-loop-arrays
30 So CFLAGS could look like
31 this: -march=i486 -m3dnow -O2 -fomit-frame-pointer -fprefetch-loop-arrays
32
33 I wrote a little program that shows the behaviour of gcc without having to
34 recompile lame (see mpglib/layer2.c for original sources that caused the
35 abortion):
36
37 /**
38 * Compile with: gcc -march=i486 -m3dnow -fprefetch-loop-arrays -o gcc-bug.o
39 gcc-bug.c -O2
40 */
41 int
42 main(int argc, char **argv)
43 {
44 int *table;
45
46 for (;;)
47 *table++ = 10;
48
49 return 0;
50 }
51
52 Could this be a gcc bug?
53
54 Greetings
55 Philipp Hasse
56
57
58 --
59 gentoo-dev@g.o mailing list

Replies