https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92476

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
And I have one more test-case reduced from rubygem-passenger:

$ cat kit.ii
namespace Passenger {
namespace Json {
class Value;
}
namespace ConfigKit {
class Translator;
}
namespace LoggingKit {
void initialize(const Json::Value &, const ConfigKit::Translator &) {}
} // namespace LoggingKit
} // namespace Passenger

$ cat hooks.ii
namespace Passenger {
namespace Json {
class Value {};
} // namespace Json
namespace ConfigKit {
class Translator {};
} // namespace ConfigKit
namespace LoggingKit {
void initialize(const Json::Value & = Json::Value(),
                const ConfigKit::Translator & = ConfigKit::Translator());
void init_module() { initialize(); }
} // namespace LoggingKit
} // namespace Passenger

$ c++ -o kit.o -O2 -fPIC -flto=auto -fPIC -fvisibility=hidden -c kit.ii
$ c++ -o hooks.o -fPIC -flto=auto -fPIC -fvisibility=hidden -c hooks.ii
$ c++ -shared hooks.o -fPIC -o mod_passenger.so kit.o
during IPA pass: cp
lto1: internal compiler error: Segmentation fault
0xa15d2f crash_signal
        ../../gcc/toplev.c:328
0x7f096d32e14f ???
       
/usr/src/debug/glibc-2.30-1.2.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0x5ca09a set_single_call_flag
        ../../gcc/ipa-cp.c:1170
0x670cd4 cgraph_node::call_for_symbol_thunks_and_aliases(bool (*)(cgraph_node*,
void*), void*, bool, bool)
        ../../gcc/cgraph.c:2267
0x11f6a11 initialize_node_lattices
        ../../gcc/ipa-cp.c:1197
0x11f6a11 ipcp_propagate_stage
        ../../gcc/ipa-cp.c:3701
0x11fa8f4 ipcp_driver
        ../../gcc/ipa-cp.c:5560
0x11fa8f4 execute
        ../../gcc/ipa-cp.c:5653
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
lto-wrapper: fatal error: c++ returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status

Reply via email to