Compiling an openmp C++ program with gcc-4.2.2 caused an internal compiler error. This is the message printed: g++ -c -O3 -fopenmp -o genfield.o genfield.cxx genfield.cxx: In function 'int main(int, char**)': genfield.cxx:0: internal compiler error: in lower_stmt, at gimple-low.c:282 I'm attaching the preprocessed source. Reproducible: Always Steps to Reproduce: 1.g++-4.2.2 -fopenmp -c genfield.preproced.cxx Actual Results: genfield.cxx: In function 'int main(int, char**)': genfield.cxx:0: internal compiler error: in lower_stmt, at gimple-low.c:282 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugs.gentoo.org/> for instructions. Portage 2.1.3.16 (default-linux/amd64/2006.1/desktop, gcc-4.2.2, glibc-2.6.1-r0, 2.6.22-gentoo-r9 x86_64) ================================================================= System uname: 2.6.22-gentoo-r9 x86_64 Dual Core AMD Opteron(tm) Processor 275 Timestamp of tree: Thu, 08 Nov 2007 11:00:01 +0000 app-shells/bash: 3.2_p17 dev-java/java-config: 1.3.7, 2.0.33-r1 dev-lang/python: 2.4.4-r6 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 1.12.9-r2 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.18-r1 sys-devel/gcc-config: 1.3.16 sys-devel/libtool: 1.5.24 virtual/os-headers: 2.6.22-r2 ACCEPT_KEYWORDS="amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=k8 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/bonobo-activation /etc/dev.d /etc/devfs.d /etc/env.d /etc/env.d/java/ /etc/esd /etc/eselect /etc/fonts /etc/foomatic /etc/gconf /etc/gnome-vfs-2.0 /etc/gtk /etc/gtk-2.0 /etc/hal /etc/imlib /etc/init.d /etc/openoffice /etc/pango /etc/ppp /etc/revdep-rebuild /etc/sgml /etc/sound /etc/ssl /etc/terminfo /etc/texmf/web2c /etc/udev /etc/udev/rules.d /etc/vga /etc/wget /etc/xdg /etc/xml /usr/share/X11/xkb /usr/share/texmf/tex/platex/config" CXXFLAGS="-O2 -march=k8 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="cvs distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LINGUAS="en" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage/local/layman/science /usr/portage/local/bgreen" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X aac aalib acpi alsa amd64 berkdb bitmap-fonts bzip2 cairo cdr cli cracklib crypt cscope cups dbus devhelp dri dvd dvdr eds emboss encode esd fam fbcon ffmpeg firefox foomaticdb fortran gd gdbm gif glut gmp gnome gnutls gpm gstreamer gtk gtk2 hal hddtemp howl iconv imlib ipv6 isdnlog jpeg lapack lcms libcaca libnotify lm_sensors logrotate mad mbox midi mng motif mp3 mpeg mudflap ncurses nfs nls nptl nptlonly nsplugin opengl openmp pam pam_console pcre pdf perl png ppds pppd python qt3 qt4 quicktime readline reflection ruby sdl session spell spl ssl svg tcpd tetex tiff truetype truetype-fonts type1-fonts usb userlocales vim-syntax vim-with-x xinerama xml2 xorg xpm xv 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 mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="nvidia" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Find preprocessed source here: http://people.nas.nasa.gov/~bgreen/genfield.preproced.cxx
always post files as attachments, do not post links to files if the file is too big, compress it
Created attachment 135602 [details] compressed preprocessed source code Compressed and attached, as you wish.
Created attachment 135807 [details] genfield-reduced.ii ugly reduced test case ... i'm not a C++ pro, so someone else might be able to whittle it down further
looks like PR32177 ... i'll test the patch there
Created attachment 153165 [details] New bug appereance on Ubuntu, g++ 4.2.3
and this is fixed with gcc-4.3.2 ...