Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 40141 - g++ reports a internal compiler error
Summary: g++ reports a internal compiler error
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High critical (vote)
Assignee: Please assign to toolchain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-01 18:06 UTC by Stephen Torri
Modified: 2004-02-23 11:24 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Personal application to prove compiler bug (libreverse-0.1.0.tar.gz,298.13 KB, image/x-xpixmap)
2004-02-07 10:42 UTC, Stephen Torri
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Torri 2004-02-01 18:06:49 UTC
This bug message is when I compile a personal application that I am developing.
I am attempting to produce an example which reports it. The gcc source that is triggering this is:

<gcc/config/i386/i386.c lines 13621-13622>

	  if (ix86_regparm > 2)
	    abort ();

Elf_Decoder.cpp: In member function `const std::string& 
   module::binary_file_decoder::Elf_Decoder::_ZThn4_N6module19binary_file_decoder11Elf_Decoder4nameEv()':
Elf_Decoder.cpp:3: Internal compiler error in x86_output_mi_thunk, at 
   config/i386/i386.c:13622
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
make[6]: *** [Elf_Decoder.lo] Error 1

The project I am using is making heavy use of C++ templates and namespaces.

bash-2.05b$ gcc --version
gcc (GCC) 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r3, propolice)

bash-2.05b$ sudo emerge -pv gcc
Password:

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] sys-devel/gcc-3.2.3-r3  -static +nls -bootstrap +java -build


Reproducible: Always
Steps to Reproduce:
Reproducible here but working on a simple example.



Expected Results:  
Program compiles.
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-02-01 18:18:59 UTC
emerge info output?

also try reducing your cflags, as GCC ICEs are most often signs of slightly flakey hardware (cpu/memory usually).
Comment 2 Stephen Torri 2004-02-01 19:12:19 UTC
emerge info output?

Portage 2.0.49-r20 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r9, 2.4.22-gentoo-r5)
=================================================================
System uname: 2.4.22-gentoo-r5 i686 Pentium III (Katmai)
Gentoo Base System version 1.4.3.10p1
distcc 2.11.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -O3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=pentium3 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache fixpackages sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X alsa apm arts avi berkdb bonobo cdr crypt cups curl encode esd flash foomaticdb gd gdbm gif gnome gpm gtk gtk2 gtkhtml guile imlib java jpeg kde ldap libg++ libwww mad mikmod mmx motif mozilla mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl php png python qt quicktime readline sdl slang snmp spell ssl svga tcltk tcpd tetex truetype x86 xml2 xmms xv zlib"


> also try reducing your cflags, as GCC ICEs are most often signs of slightly
> flakey hardware (cpu/memory usually).

What are GCC ICEs? I took out the mregparm flag and the program compiles. I am told that is a potentially useful flag.

Owning flaky hardware is not something that is appealing. Can you give your reasons as to why you suspect the hardware is flaky?
Comment 3 Martin Holzer (RETIRED) gentoo-dev 2004-02-02 06:28:06 UTC
please run memtest86 and cpuburn
Comment 4 Stephen Torri 2004-02-03 13:53:35 UTC
I ran burnP6 for 5 minutes while monitoring via lmsensors for temperature. The program did not return an error. I ran memtest86 for 8 hours but no errors were reported. I did not write down any results from it so if they are necessary let me know. The system is a P3 450Mhz x 2. I don't know if the mregparm flag value is restricted by the type of cpu you have in the system.
Comment 5 Martin Schlemmer (RETIRED) gentoo-dev 2004-02-04 10:34:24 UTC
That does not look like bad memory,etc, but compiler bug.  Can you create a
test case (as I am assuming that you do not want to release your code) that
demonstrates this?
Comment 6 Stephen Torri 2004-02-07 10:42:12 UTC
Created attachment 25139 [details]
Personal application to prove compiler bug

This is the personal application I am compiling. I have it set so that it uses
-mregparm=3. You will need to have boost installed. To compile:

./configure
make
Comment 7 Martin Schlemmer (RETIRED) gentoo-dev 2004-02-08 01:49:01 UTC
Seems fine over here with 3.3.2.  As it is stable now, can you please give it
a shot?
Comment 8 Stephen Torri 2004-02-19 23:15:08 UTC
3.3.2 works here.
Comment 9 Martin Schlemmer (RETIRED) gentoo-dev 2004-02-23 11:24:32 UTC
Closing this as 3.3.2 is stable now.