------- 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());
}
rguent...@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
rguent...@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 <http://bugs.opensuse.org/> 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