Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 346845 (PR46734) - sys-devel/gcc-4.5.1-r1: ICE in create_tmp_var, at gimplify.c:505 with boost code
Summary: sys-devel/gcc-4.5.1-r1: ICE in create_tmp_var, at gimplify.c:505 with boost code
Status: RESOLVED FIXED
Alias: PR46734
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://gcc.gnu.org/PR46734
Whiteboard:
Keywords:
Depends on: 348898
Blocks:
  Show dependency tree
 
Reported: 2010-11-26 16:18 UTC by Cyril42e
Modified: 2010-12-28 01:08 UTC (History)
0 users

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


Attachments
preprocessed source (segmentAnchorPluckerFeature.i.Z,876.82 KB, application/octet-stream)
2010-11-26 16:23 UTC, Cyril42e
Details
preprocessed source (1.6 MB) (segmentAnchorPluckerFeature.2.i.gz,172.88 KB, application/octet-stream)
2010-12-07 00:00 UTC, Cyril42e
Details
testcase source (test.cpp,893 bytes, text/plain)
2010-12-07 00:08 UTC, Cyril42e
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cyril42e 2010-11-26 16:18:11 UTC
When compiling a c++ work project which uses boost-1.42.0-r2 with gcc-4.5.1-r1, I get an internal error when compiling some unit. It only happens with the -02 or -03 option, not with -O0 or -O1.

I will attach the preprocessed output, in order to easily reproduce the bug with the "steps to reproduce".

Reproducible: Always

Steps to Reproduce:
1./usr/bin/g++ -O2 -o segmentAnchorPluckerFeature.cpp.o -c segmentAnchorPluckerFeature.i
2.
3.

Actual Results:  
In file included from /mnt/data/LAAS/Libs/jafar/modules/jmath/include/jmath/ublasExtra.hpp:12:0,
                 from /mnt/data/LAAS/Libs/jafar/modules/slam/src/segmentAnchorPluckerFeature.cpp:6:
/usr/include/boost/numeric/ublas/vector_proxy.hpp: In function ‘boost::numeric::ublas::vector_range<V> boost::numeric::ublas::vector_range<V>::project(const boost::numeric::ublas::vector_range<V>::range_type&) const [with V = boost::numeric::ublas::vector<double>, boost::numeric::ublas::vector_range<V>::range_type = boost::numeric::ublas::basic_range<>, typename A::difference_type = int, typename A::size_type = unsigned int]’:
/usr/include/boost/numeric/ublas/vector_proxy.hpp:62:58: internal compiler error: in create_tmp_var, at gimplify.c:505
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions.

Expected Results:  
correct compilation

emerge --info :

Portage 2.2.0_alpha5 (default/linux/x86/10.0, gcc-4.5.1, glibc-2.12.1-r3, 2.6.35-gentoo-r4 i686)
=================================================================
System uname: Linux-2.6.35-gentoo-r4-i686-Intel-R-_Core-TM-2_Duo_CPU_P8400_@_2.26GHz-with-gentoo-2.0.1
Timestamp of tree: Thu, 25 Nov 2010 10:45:01 +0000
app-shells/bash:     4.1_p9
dev-java/java-config: 2.1.10
dev-lang/python:     2.4.6, 2.5.4-r4, 2.6.6-r1, 3.1.2-r4
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1-r1
sys-apps/openrc:     0.6.5
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.68
sys-devel/automake:  1.4_p6-r1, 1.5-r1, 1.6.3-r1, 1.7.9-r2, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.5.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.4
sys-devel/make:      3.82
virtual/os-headers:  2.6.36.1 (sys-kernel/linux-headers)
Repositories: gentoo perso
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
CHOST="i686-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/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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=native -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="    http://mirror.ovh.net/gentoo-distfiles/     ftp://ftp.free.fr/mirrors/ftp.gentoo.org/     http://mirror.switch.ch/ftp/mirror/gentoo/     http://gentoo.intergenia.de     "
LANG="en_FR.UTF-8"
LC_ALL="en_FR.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en fr"
MAKEOPTS="-j3"
PKGDIR="/usr/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="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/perso"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow X a52 aac acl acpi alsa apm atm audiofile berkdb bluetooth bz2 bzip2 cairo cdda cdr cli cracklib crypt cups cxx dbus dell divx dri dv dvb dvd dvdr dvdread esd exif fat ffmpeg firefox flac fortran fuse gdbm gif gimp glx gpm gtk gtk2 h264 hardened iconv ieee1394 ipv6 jpeg jpeg2k kde kpathsea lame ldap lirc lm_sensors mbox mime mmx modules mp3 mp4 mpeg mudflap musepack ncurses network nls nptl nptlonly nsplugin ntfs nvidia ogg opengl openmp pam pcmcia pcre pdf perl png posix pppd python qt qt3support quicktime readline reiserfs samba sdl session spell sqlite sse sse2 ssl svg sysfs tcpd threads tiff truetype udev unicode usb v4l v4l2 vdr vorbis wifi win32codecs wma wmf wmp x264 x86 xcomposite xfs xinerama xml xorg xosd xpm xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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 casio_qv ptp2" 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 synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en fr" LIRC_DEVICES="devinput pctv inputlirc" PHP_TARGETS="php5-2" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nouveau nv vesa nvidia v4l" 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, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Cyril42e 2010-11-26 16:23:57 UTC
Created attachment 255503 [details]
preprocessed source

This source file was preprocessed on an x86 arch, and will only work on an x86 arch. Uncompress the file with the "uncompress" command first (was larger than max upload size).
Comment 2 Ryan Hill (RETIRED) gentoo-dev 2010-11-30 23:26:23 UTC
also fails with gcc version 4.5.2-pre9999 20101130 (prerelease) rev. 167289 (Gentoo SVN).  i'll try to cut this testcase down a bit.
Comment 3 Cyril42e 2010-12-07 00:00:46 UTC
Created attachment 256554 [details]
preprocessed source (1.6 MB)

I tried to cut it down a bit as it is easier for me with the raw sources, but I only achieved 3.6M -> 1.6M. The only external headers included are now :

#include "boost/numeric/ublas/vector.hpp"
#include "boost/numeric/ublas/vector_proxy.hpp"

Still x86, but now use gunzip to uncompress (don't know why I used compress the first time).
Comment 4 Cyril42e 2010-12-07 00:08:08 UTC
Created attachment 256557 [details]
testcase source

I managed to cut down the test case to a very simple file (the previous preprocessed source was generated with it).

It only includes two files from 
svn+http://svn.boost.org/svn/boost/sandbox/numeric_bindings-v1/
(latest version)

If I change a few details, like defining the body of the method estimateValue inside of the class declaration instead of outside, or using vector<double> instead of vector_range<vector<double> >, then it compiles fine.

Hope it will help.
Comment 5 Ryan Hill (RETIRED) gentoo-dev 2010-12-07 00:19:59 UTC
I managed to reduce your first example down to 10KB, it's on the upstream bug report.  I'll see what i can do with this one.
Comment 6 Cyril42e 2010-12-07 00:50:28 UTC
(In reply to comment #5)
> I managed to reduce your first example down to 10KB, it's on the upstream bug
> report.  I'll see what i can do with this one.

Ok, I didn't notice the upstream URL, my fault. Sorry!

By merging your 10KB file with my source, I could reduce it to 6KB, but I don't think it will make any difference. Tell me if you want me to post it.

Just out of curiosity, you used a program to strip unused code from the preprocessed source, you didn't do it manually?

Oh and sorry for the file type too :-s
Comment 7 Ryan Hill (RETIRED) gentoo-dev 2010-12-07 01:04:48 UTC
I used topformflat and delta as described here: http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction.  They're available as app-text/delta.

I think upstream has enough info now.  They seem to be narrowing down the problem.
Comment 8 Ryan Hill (RETIRED) gentoo-dev 2010-12-28 01:08:12 UTC
Fixed in 4.5.2.