From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14275 invoked by alias); 1 Jul 2010 11:35:30 -0000 Received: (qmail 14246 invoked by uid 48); 1 Jul 2010 11:35:19 -0000 Date: Thu, 01 Jul 2010 11:35:00 -0000 Message-ID: <20100701113519.14245.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug lto/44724] LTO segfault with -fuse-linker-plugin In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" 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-07/txt/msg00050.txt.bz2 ------- Comment #5 from rguenth at gcc dot gnu dot org 2010-07-01 11:35 ------- Confirmed. Works without -fuse-linker-plugin. Reduced testcases: wave.ii ------- typedef unsigned int reg8; typedef unsigned int reg12; class WaveformGenerator { public: reg8 readOSC(); inline reg12 output(); reg8 waveform; reg12 output____(); }; inline reg12 WaveformGenerator::output() { switch (waveform) { default: return output____(); } } reg8 WaveformGenerator::readOSC() { return output() >> 4; } sid.ii ------ typedef unsigned int reg8; typedef unsigned int reg12; typedef int sound_sample; class WaveformGenerator { public: reg8 readOSC(); inline reg12 output(); reg8 waveform; reg12 output____(); }; inline reg12 WaveformGenerator::output() { switch (waveform) { case 0x0: return output____(); } } class Voice { inline sound_sample output(); WaveformGenerator wave; friend class SID; }; inline sound_sample Voice::output() { return wave.output(); }; class Filter { public: void clock(sound_sample voice1, sound_sample voice2, sound_sample voice3); }; class SID { void clock(); Voice voice[3]; Filter filter; }; void SID::clock() { filter.clock(voice[0].output(), voice[1].output(), voice[2].output()); } rguenther@murzim:/tmp> g++-4.5 -r -nostdlib -O2 -march=pentium4 -flto -fuse-linker-plugin -m32 sid.3.ii wave.3.ii /usr/bin/gold: error: /tmp/ccbAKTWf.lto.o: incompatible target collect2: ld returned 1 exit status rguenther@murzim:/tmp> g++-4.5 -r -nostdlib -O2 -march=pentium4 -flto -fuse-linker-plugin -m32 wave.3.ii sid.3.ii lto1: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. lto-wrapper: g++-4.5 returned 1 exit status /usr/bin/gold: fatal error: lto-wrapper failed collect2: ld returned 1 exit status -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |NEW Ever Confirmed|0 |1 Keywords| |lto Last reconfirmed|0000-00-00 00:00:00 |2010-07-01 11:35:19 date| | Summary|LTO segfault |LTO segfault with -fuse- | |linker-plugin http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44724