Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 130001 - gcc-3.4/ICE in cgraph_expand_function when using -O3 -finstrument-functions
Summary: gcc-3.4/ICE in cgraph_expand_function when using -O3 -finstrument-functions
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-14 17:34 UTC by Stefan Lucke
Modified: 2006-04-15 22:15 UTC (History)
0 users

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


Attachments
Preprocessed source (cc6zsQqL.out,276.90 KB, text/plain)
2006-04-14 17:40 UTC, Stefan Lucke
Details
emerge --info (emerge-info-01.txt,2.15 KB, text/plain)
2006-04-15 04:55 UTC, Stefan Lucke
Details
debug.c (debug.c,67 bytes, text/plain)
2006-04-15 22:14 UTC, SpanKY
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Lucke 2006-04-14 17:34:23 UTC
Portage 2.1_pre6-r3 (default-linux/x86/2006.0, gcc-3.4.4, glibc-2.3.5-r2, 2.6.15-gentoo-r1 i686)
=================================================================
System uname: 2.6.15-gentoo-r1 i686 Intel(R) Pentium(R) 4 CPU 2.20GHz
Gentoo Base System version 1.6.14
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/share/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp.uni-erlangen.de/pub/mirrors/gentoo"
LINGUAS="en de fr us"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="x86 X alsa apache2 apm arts avi berkdb bitmap-fonts cdr cli crypt ctype cups dba dri dvd eds emboss encode esd expat fastbuild foomaticdb force-cgi-redirect fortran ftp gd gdbm gif gpm gstreamer gtk2 imlib jpeg kde libg++ libwww mad memlimit mikmod motif mp3 mpeg ncurses nls nptl ogg opengl oss pam pcre pdflib perl png posix python qt quicktime readline sdl session simplexml soap sockets spell spl ssl tcpd tokenizer truetype truetype-fonts type1-fonts udev vorbis xml xmms xsl xv zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux linguas_en linguas_de linguas_fr linguas_us userland_GNU video_cards_ati video_cards_mga video_cards_vesa video_cards_fbdev"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LANG, LC_ALL, LDFLAGS
Comment 1 Stefan Lucke 2006-04-14 17:40:04 UTC
Created attachment 84674 [details]
Preprocessed source

Error happens when DirectFB is configured with '--enable-multi --enable-debug --enable-trace'
Error message from compiler:
 gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include -I../../lib -I../../include -I../../lib -DDATADIR=\"/usr/local/share/directfb-0.9.25\" -DMODULEDIR=\"/usr/local/lib/directfb-0.9.25\" -D_REENTRANT -O3 -ffast-math -pipe -g3 -fno-inline -D_GNU_SOURCE -finstrument-functions -Werror-implicit-function-declaration -MT debug.lo -MD -MP -MF .deps/debug.Tpo -c debug.c  -fPIC -DPIC -o .libs/debug.o
debug.c: In function `direct_list_check_link':
debug.c:63: internal compiler error: in cgraph_expand_function, at cgraphunit.c:540
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
Preprocessed source stored into /tmp/cc6zsQqL.out file, please attach this to your bugreport.
make[3]: *** [debug.lo] Error 1
make[3]: Leaving directory `/usr/local/src/directfb-2006-04-14/DirectFB/lib/direct'
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-04-15 03:53:33 UTC
Upgrade gcc to latest stable version (3.4.5-r1) at least before reporting compiler issues. Also, can you reproduce the problem, i.e. - does it fail again at *exactly* the same place?
Comment 3 Stefan Lucke 2006-04-15 04:14:02 UTC
It happens again allways at the same place on two different systems.
To exclude some hardware issues I moved to an other box. Sorry for confusion.

Initially it happens on a system with:

 gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include -I../../lib -I../../include -I../../lib -DDATADIR=\"/usr/local/share/directfb-0.9.25\" -DMODULEDIR=\"/usr/local/lib/directfb-0.9.25\" -D_REENTRANT -O3 -ffast-math -pipe -g3 -fno-inline -D_GNU_SOURCE -finstrument-functions -Werror-implicit-function-declaration -MT debug.lo -MD -MP -MF .deps/debug.Tpo -c debug.c  -fPIC -DPIC -o .libs/debug.o
debug.c: In function `direct_list_check_link':
debug.c:63: internal compiler error: in cgraph_expand_function, at cgraphunit.c:540
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
Preprocessed source stored into /tmp/ccZoQSBa.out file, please attach this to your bugreport.
make[3]: *** [debug.lo] Error 1
make[3]: Leaving directory `/usr/local/src/directfb-2006-04-14/DirectFB/lib/direct'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/directfb-2006-04-14/DirectFB/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/directfb-2006-04-14/DirectFB'
make: *** [all] Error 2
bodega3b DirectFB # gcc --version
gcc (GCC) 3.4.5 (Gentoo 3.4.5, ssp-3.4.5-1.0, pie-8.7.9)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


from emerge --search gcc

*  sys-devel/gcc
      Latest version available: 3.4.5-r1
      Latest version installed: 3.4.5
      Size of downloaded files: 85,642 kB
      Homepage:    http://gcc.gnu.org/
      Description: The GNU Compiler Collection. Includes C/C++, java compilers, pie+ssp extensions, Haj Ten Brugge runtime bounds checking
      License:     GPL-2 LGPL-2.1
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2006-04-15 04:17:13 UTC
(In reply to comment #3)
> *  sys-devel/gcc
>       Latest version available: 3.4.5-r1
>       Latest version installed: 3.4.5

You are apparently not using 3.4.5-r1 to compile, see your emerge --info output.

> Portage 2.1_pre6-r3 (default-linux/x86/2006.0, gcc-3.4.4, glibc-2.3.5-r2,

If you are using USE=multislot for gcc, you need to actually switch to the new version via gcc-config.
Comment 5 Stefan Lucke 2006-04-15 04:55:31 UTC
Created attachment 84708 [details]
emerge --info

new emgerge --info after compiler upgrade
Comment 6 Stefan Lucke 2006-04-15 05:03:15 UTC
Shame on me.

(In reply to comment #4)
> (In reply to comment #3)
> > *  sys-devel/gcc
> >       Latest version available: 3.4.5-r1
> >       Latest version installed: 3.4.5
> 
> You are apparently not using 3.4.5-r1 to compile, see your emerge --info
> output.

Sorry again, just after posting I saw the slight different footprint "-r1". After emgerge gcc, gcc reports itself now with:

bodega3b DirectFB # gcc --version
gcc (GCC) 3.4.5 (Gentoo 3.4.5-r1, ssp-3.4.5-1.0, pie-8.7.9)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiler error message is still the same:

debug.c: In function `direct_list_check_link':
debug.c:63: internal compiler error: in cgraph_expand_function, at cgraphunit.c:540
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.


> 
> > Portage 2.1_pre6-r3 (default-linux/x86/2006.0, gcc-3.4.4, glibc-2.3.5-r2,
> 
> If you are using USE=multislot for gcc, you need to actually switch to the new
> version via gcc-config.
> 
 Attachend new emerge --info. There is no "multislot" string. So I don't understand this request.
Comment 7 SpanKY gentoo-dev 2006-04-15 22:14:20 UTC
Created attachment 84753 [details]
debug.c

stripped down testcase
Comment 8 SpanKY gentoo-dev 2006-04-15 22:15:42 UTC
this failure is fixed in gcc-4.0+

gcc-3.4 is dead upstream and really we dont have the technical skills to fix the issue

gcc doesnt ICE if you use -O2 so you should tweak your local checkout of DirectFB to use -O2 instead of -O3 (look in the configure / configure.in files)