From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20542 invoked by alias); 30 Jun 2010 12:23:06 -0000 Received: (qmail 20433 invoked by uid 48); 30 Jun 2010 12:22:35 -0000 Date: Wed, 30 Jun 2010 12:23:00 -0000 Subject: [Bug lto/44724] New: LTO segfault X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "moonshine at kapsi dot fi" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-06/txt/msg02924.txt.bz2 VICE Commodore emulator lto-build fails with a segfault in lto1. The code has both C and C++ source files so it is linked with g++. As compilation fails during lto, it is difficult to produce a self-contained testcase, but you should be able to reproduce the fault by downloading and building VICE http://www.zimmers.net/anonftp/pub/cbm/crossplatform/emulators/VICE/vice-2.2.tar.gz If there is a simple way to produce a smaller testcase for this bug, please let me know. I am using newest binutils from cvs, configured with --enable-gold --enable-plugins $ ld -v GNU gold (GNU Binutils 2.20.51.20100629) 1.9 and gcc from svn 4.5 branch revision 161539. $ g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/home/misty/gcc/libexec/gcc/i686-pc-linux-gnu/4.5.1/lto-wrapper Target: i686-pc-linux-gnu Configured with: ../gcc-45branch/configure --prefix=/home/misty/gcc --enable-languages=c,c++ --enable-gold --enable-lto --enable-plugins Thread model: posix gcc version 4.5.1 20100629 (prerelease) (GCC) Link command: g++ -flto -fuse-linker-plugin -O3 -fomit-frame-pointer -march=pentium4 -o x64 alarm.o attach.o autostart.o autostart-prg.o charset.o clkguard.o clipboard.o cmdline.o cbmdos.o cbmimage.o color.o crc32.o datasette.o debug.o dma.o embedded.o emuid.o event.o findpath.o fliplist.o gcr.o info.o init.o initcmdline.o interrupt.o ioutil.o joystick.o kbdbuf.o keyboard.o lib.o libm_math.o lightpen.o log.o machine-bus.o machine.o main.o network.o opencbmlib.o palette.o ram.o rawfile.o resources.o romset.o screenshot.o snapshot.o socket.o sound.o sysfile.o translate.o traps.o util.o vsync.o zfile.o zipcode.o maincpu.o mouse.o midi.o ../src/c64/libc64.a ../src/c64/cart/libc64cart.a ../src/drive/iec/libdriveiec.a ../src/drive/iecieee/libdriveiecieee.a ../src/drive/iec/c64exp/libdriveiecc64exp.a ../src/drive/ieee/libdriveieee.a ../src/drive/libdrive.a ../src/iecbus/libiecbus.a ../src/parallel/libparallel.a ../src/vdrive/libvdrive.a ../src/sid/libsid.a ../src/monitor/libmonitor.a ../src/sounddrv/libsounddrv.a ../src/gfxoutputdrv/libgfxoutputdrv.a ../src/printerdrv/libprinterdrv.a ../src/rs232drv/librs232drv.a ../src/diskimage/libdiskimage.a ../src/fsdevice/libfsdevice.a ../src/tape/libtape.a ../src/imagecontents/libimagecontents.a ../src/fileio/libfileio.a ../src/serial/libserial.a ../src/core/libcore.a ../src/vicii/libvicii.a ../src/raster/libraster.a ../src/video/libvideo.a ../src/arch/unix/libarch.a ../src/arch/unix/gui/libarchgui.a ../src/arch/unix/x11/gnome/libgnomeui.a ../src/arch/unix/x11/libx11ui.a ../src/resid/libresid.a ../src/resid-fp/libresidfp.a -lXrandr -lXxf86vm -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lasound -lreadline -ljpeg -lgif -lpng -lz -ldl -lbsd -lnsl -lbsd -lm resid-fp.h:32:21: warning: type of ‘residfp_hooks’ does not match original declaration resid-fp.cc:282:14: note: previously declared here ../../src/interrupt.h:289:14: warning: type of ‘drive_clk’ does not match original declaration drive.c:131:7: note: previously declared here fastsid.h:33:21: warning: type of ‘fastsid_hooks’ does not match original declaration fastsid.c:1028:14: note: previously declared here lto1: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. lto-wrapper: g++ returned 1 exit status /home/misty/gcc/lib/gcc/i686-pc-linux-gnu/4.5.1/../../../../i686-pc-linux-gnu/bin/ld: fatal error: lto-wrapper failed collect2: ld returned 1 exit status -- Summary: LTO segfault Product: gcc Version: 4.5.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: moonshine at kapsi dot fi GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44724