This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/78908] [6/7 Regression] lto1: internal compiler error: in lto_read_decls, at lto/lto.c:1814
- From: "trippels at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 23 Dec 2016 07:49:09 +0000
- Subject: [Bug lto/78908] [6/7 Regression] lto1: internal compiler error: in lto_read_decls, at lto/lto.c:1814
- Auto-submitted: auto-generated
- References: <bug-78908-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78908
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2016-12-23
CC| |hubicka at gcc dot gnu.org,
| |trippels at gcc dot gnu.org
Known to work| |5.4.1
Summary|lto1: internal compiler |[6/7 Regression] lto1:
|error: in lto_read_decls, |internal compiler error: in
|at lto/lto.c:1814 |lto_read_decls, at
| |lto/lto.c:1814
Ever confirmed|0 |1
Known to fail| |6.3.0, 7.0
--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
markus@x4 tmp % cat lto_read_decls_reduce_ut.ii
struct A {
unsigned depth : 1;
};
template <typename> struct Writer_Endpoint;
template <unsigned long> struct B;
struct C {
struct D {
template <typename> static Writer_Endpoint<B<0>> *__test();
typedef decltype(__test<int>()) type;
};
D::type operator->();
};
enum Participant_Id { NYSE_MKT };
using participant_id = Participant_Id;
struct F {
virtual void on_inner_remove(unsigned long, A const &);
};
template <typename> struct O : F {
void on_inner_remove(unsigned long, A const &);
};
template <typename Logger> struct G {
template <typename T> void insert(T p1) { logger_->insert(p1); }
Logger *logger_;
};
template <typename Logger, typename T> void operator<<(Logger p1, T p2) {
p1.insert(p2);
}
struct H;
struct I {
H *operator->();
};
struct J {
using size_type = int;
};
template <unsigned long queue_size> struct Writer_Endpoint<B<queue_size>> : J {
template <typename, typename, typename...> void emplace();
struct K;
template <typename> size_type next_index();
};
template <unsigned long queue_size> struct Writer_Endpoint<B<queue_size>>::K {
K(Writer_Endpoint *, size_type);
};
template <unsigned long queue_size>
template <typename, typename, typename...>
void Writer_Endpoint<B<queue_size>>::emplace() {
size_type a = next_index<int>();
K(0, a);
}
struct H {
C __trans_tmp_4;
template <typename T> void insert(T const &);
decltype(__trans_tmp_4) wep_;
};
template <typename T> void H::insert(T const &) { wep_->emplace<T, int>(); }
template <typename> struct L {
template <typename T> void insert(T const &);
I backend_;
};
template <typename Tag> template <typename T> void L<Tag>::insert(T const &p1)
{
backend_->insert(p1);
}
G<L<int>> b, c;
template <typename T_ENCODER>
void O<T_ENCODER>::on_inner_remove(unsigned long, A const &p2) try {
b << p2.depth;
} catch (...) {
}
struct M;
template <class = int> struct UT_Merger;
template <> struct UT_Merger<> : O<M> {
UT_Merger() {}
};
template <unsigned long> struct N {
int const *process();
N(F p1, int, participant_id, int) : handler_(p1) {}
void process(int const &, int const &, unsigned short);
void process(int const &, A const &, unsigned short);
unsigned char expected_detail_level_;
F &handler_;
};
template <unsigned long TBookDepth> int const *N<TBookDepth>::process() {
process(0, 0, 0);
process(0, *reinterpret_cast<A *>(0), 0);
}
template <unsigned long TBookDepth>
void N<TBookDepth>::process(int const &, int const &, unsigned short) try {
c << expected_detail_level_;
} catch (...) {
}
template <unsigned long TBookDepth>
void N<TBookDepth>::process(int const &, A const &p2, unsigned short) {
handler_.on_inner_remove(0, p2);
}
void Synsip_Book_ut_channel_info_TestTestBody() {
F h;
N<0> d(h, 0, NYSE_MKT, 0);
d.process();
}
markus@x4 tmp % g++ -std=c++11 -flto -shared -fPIC -O2
lto_read_decls_reduce_ut.ii
lto_read_decls_reduce_ut.ii:98:1: error: Two symbols with same comdat_group are
not linked by the same_comdat_group list.
}
^
_ZN15Writer_EndpointI1BILm0EEE7emplaceIhiJEEEvv/37 (void
Writer_Endpoint<B<queue_size> >::emplace() [with <template-parameter-2-1> =
unsigned char:1; <template-parameter-2-2> = int; <template-parameter-2-3> = {};
long unsigned int queue_size = 0]) @0x7ffbc66efa10
Type: function definition analyzed
Visibility: public weak comdat
comdat_group:_ZN15Writer_EndpointI1BILm0EEE7emplaceIhiJEEEvv one_only
previous sharing asm name: 25
References:
Referring:
First run: 0
Function flags: body
Called by: _ZN1H6insertIhEEvRKT_/36 (1.00 per call) (can throw external)
Calls: _ZN15Writer_EndpointI1BILm0EEE1KC1EPS2_i/46 (1.00 per call) (can throw
external) _ZN15Writer_EndpointI1BILm0EEE10next_indexIiEEiv/45 (1.00 per call)
(can throw external)
_ZN15Writer_EndpointI1BILm0EEE7emplaceIhiJEEEvv/25 (void
Writer_Endpoint<B<queue_size> >::emplace() [with <template-parameter-2-1> =
unsigned char; <template-parameter-2-2> = int; <template-parameter-2-3> = {};
long unsigned int queue_size = 0]) @0x7ffbc66ef170
Type: function definition analyzed
Visibility: public weak comdat
comdat_group:_ZN15Writer_EndpointI1BILm0EEE7emplaceIhiJEEEvv one_only
next sharing asm name: 37
References:
Referring:
First run: 0
Function flags: body
Called by: _ZN1H6insertIhEEvRKT_/24 (1.00 per call) (can throw external)
Calls: _ZN15Writer_EndpointI1BILm0EEE1KC1EPS2_i/46 (1.00 per call) (can throw
external) _ZN15Writer_EndpointI1BILm0EEE10next_indexIiEEiv/45 (1.00 per call)
(can throw external)
lto_read_decls_reduce_ut.ii:98:1: internal compiler error: symtab_node::verify
failed
0x94ff61 symtab_node::verify_symtab_nodes()
/home/markus/gcc/gcc/symtab.c:1217
0x9630bf symtab_node::checking_verify_symtab_nodes()
/home/markus/gcc/gcc/cgraph.h:614
0x9630bf symbol_table::compile()
/home/markus/gcc/gcc/cgraphunit.c:2403
0x965ca6 symbol_table::compile()
/home/markus/gcc/gcc/cgraphunit.c:2587
0x965ca6 symbol_table::finalize_compilation_unit()
/home/markus/gcc/gcc/cgraphunit.c:2584