After Ryan Hill unmasked GCC 4.5 (http://psykil.livejournal.com/340699.html) I tried to emerge gcc-4.5.1-r1 with gcc-4.4.4-r2. It failed several times with a Segmentation fault at different locations. Now it segfaults every time at libgcc/config/libbid/bid128_div.c:1401 Reproducible: Always Steps to Reproduce: 1. echo "sys-devel/gcc-4.5.1-r1 ~amd64" >> /etc/portage/package.keywords 2. emerge -u gcc 3. Actual Results: gcc-4.5.1/libgcc/config/libbid/bid128_div.c:1401:1: internal compiler error: Segmentation fault Expected Results: After compilation gcc should get merged. Portage 2.1.9.25 (default/linux/amd64/10.0, gcc-4.4.4, glibc-2.12.1-r3, 2.6.36-gentoo-r3 x86_64) ================================================================= System Settings ================================================================= System uname: Linux-2.6.36-gentoo-r3-x86_64-AMD_Athlon-tm-_II_X4_630_Processor-with-gentoo-1.12.14 Timestamp of tree: Tue, 30 Nov 2010 12:45:01 +0000 distcc 3.1 x86_64-pc-linux-gnu [disabled] app-shells/bash: 4.1_p7 dev-java/java-config: 2.1.11-r1 dev-lang/python: 2.5.4-r4, 2.6.6-r1, 3.1.2-r4 dev-util/cmake: 2.8.1-r2 sys-apps/baselayout: 1.12.14-r1 sys-apps/sandbox: 2.4 sys-devel/autoconf: 2.13, 2.65-r1 sys-devel/automake: 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1 sys-devel/binutils: 2.20.1-r1 sys-devel/gcc: 4.4.4-r2 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.10 sys-devel/make: 3.81-r2 virtual/os-headers: 2.6.36.1 (sys-kernel/linux-headers) ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA dlj-1.1 AdobeFlash-10.1" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=amdfam10 -O2 -pipe -ggdb" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=amdfam10 -O2 -pipe -ggdb" DISTDIR="/bigdata/portage/distfiles" FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news nodoc parallel-fetch protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" GENTOO_MIRRORS="ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ ftp://ftp6.uni-muenster.de/pub/linux/distributions/gentoo ftp://de-mirror.org/distro/gentoo/ ftp://mirror.cambrium.nl/pub/os/linux/gentoo/ ftp://ftp.df.lth.se/pub/gentoo/ ftp://ftp.heanet.ie/pub/gentoo/ ftp://ftp.cc.uoc.gr/mirrors/linux/gentoo/ ftp://gentoo.tiscali.nl/pub/mirror/gentoo/ ftp://gentoo.mirror.web4u.cz/ ftp://mirror.switch.ch/mirror/gentoo/ ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ ftp://mirror.mcs.anl.gov/pub/gentoo/ ftp://gentoo.mirror.dkm.cz/pub/gentoo/ ftp://mirror.elen.ktu.lt/ ftp://mirrors.linuxant.fr/distfiles.gentoo.org/ ftp://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.ds.karen.hj.se/gentoo/ ftp://gentoo.osuosl.org/" LDFLAGS="-Wl,--as-needed" LINGUAS="de en" MAKEOPTS="-j1" PKGDIR="/bigdata/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/bigdata/ebuild/working" PORTDIR="/bigdata/portage" PORTDIR_OVERLAY="/var/lib/layman/kde /var/lib/layman/mozilla /var/lib/layman/ikelos /var/lib/layman/postgresql-testing /var/lib/layman/lordvan /var/lib/layman/rion /usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="S3TC X acl alsa amd64 berkdb bzip2 cli cracklib crypt cups cxx dbus dri fortran gdbm gpm hal iconv ipv6 kde mmx modules mudflap multilib ncurses nls nptl nptlonly opengl openmp pam pcre perl pppd python qt3support qt4 readline semantic-desktop session sql sqlite sqlite3 sse sse2 ssl svg sysfs tcpd unicode webkit xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="canon fuji" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" NGINX_MODULES_HTTP="browser dav fastcgi geoip gzip gzip_static headers_more memcached realip rewrite ssi uwsgi" PHP_TARGETS="php5-2" RUBY_TARGETS="ruby18" SANE_BACKENDS="epson2" USERLAND="GNU" VIDEO_CARDS="fglrx" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Last build log lines: /mnt/bigdata/ebuild/working/portage/sys-devel/gcc-4.5.1-r1/work/build/./gcc/xgcc -B/mnt/bigdata/ebuild/working/portage/sys-devel/gcc-4.5.1-r1/work/build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -g -march=amdfam10 -O2 -pipe -ggdb -m32 -O2 -g -march=amdfam10 -O2 -pipe -ggdb -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../.././gcc -I/mnt/bigdata/ebuild/working/portage/sys-devel/gcc-4.5.1-r1/work/gcc-4.5.1/libgcc -I/mnt/bigdata/ebuild/working/portage/sys-devel/gcc-4.5.1-r1/work/gcc-4.5.1/libgcc/. -I/mnt/bigdata/ebuild/working/portage/sys-devel/gcc-4.5.1-r1/work/gcc-4.5.1/libgcc/../gcc -I/mnt/bigdata/ebuild/working/portage/sys-devel/gcc-4.5.1-r1/work/gcc-4.5.1/libgcc/../include -I/mnt/bigdata/ebuild/working/portage/sys-devel/gcc-4.5.1-r1/work/gcc-4.5.1/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o bid128_div.o -MT bid128_div.o -MD -MP -MF bid128_div.dep -c /mnt/bigdata/ebuild/working/portage/sys-devel/gcc-4.5.1-r1/work/gcc-4.5.1/libgcc/config/libbid/bid128_div.c /mnt/bigdata/ebuild/working/portage/sys-devel/gcc-4.5.1-r1/work/gcc-4.5.1/libgcc/config/libbid/bid128_div.c: In function ‘__bid128dq_div’: /mnt/bigdata/ebuild/working/portage/sys-devel/gcc-4.5.1-r1/work/gcc-4.5.1/libgcc/config/libbid/bid128_div.c:1401:1: internal compiler error: Segmentation fault
emerge -pqv =sys-devel/gcc-4.5.1-r1 [ebuild NS ] sys-devel/gcc-4.5.1-r1 [4.4.4-r2] USE="fortran gcj mudflap (multilib) nls nptl openmp (-altivec) -bootstrap -build -doc (-fixed-point) -graphite -gtk (-hardened) (-libffi) -lto -multislot (-n32) (-n64) -nocxx -nopie -nossp -objc -objc++ -objc-gc -test -vanilla"
Please attach the entire build log and the preprocessed source as files to this bug report. Also, figure out how much RAM that process uses - maybe it's just running out of memory?
Created attachment 256013 [details] GCC build log How can I submit the preprocessed source, do you want all *.c files under /mnt/bigdata/ebuild/working/portage/sys-devel/gcc-4.5.1-r1/ ?
Created attachment 256015 [details] GCC build log (next run with 1 GB more free RAM) I did another run, but this time I freed more memory. So I guess more than 2 GB RAM should have been available, now it segfaulted at libgcc/config/libbid/bid64_div.c:1795
try dropping -pipe and use -march=k8 in your CFLAGS make sure `dmesg` doesnt mention anything suspicious
i made 2 clean installation with the exactly same configs inside a chroot. Intel Core i7 --> works without problems AMD Phenom II X6 T1100 --> i get the exactly same issue as described here. im going to drop -pipe and try if this happens again
also bug #359239.
And the additional invalidity of that bug makes me further suspect this one. Reopen if you can prove this isn't a hardware problem.