public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/68092] New: [possibly concepts] ICE: symtab_node::verify failed. Overloaded function by concept requires
@ 2015-10-26 1:23 chrisb2244 at gmail dot com
2015-10-26 1:24 ` [Bug c++/68092] " chrisb2244 at gmail dot com
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: chrisb2244 at gmail dot com @ 2015-10-26 1:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68092
Bug ID: 68092
Summary: [possibly concepts] ICE: symtab_node::verify failed.
Overloaded function by concept requires
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: chrisb2244 at gmail dot com
Target Milestone: ---
Unsure if this is a bug or just bad code on my part. Can't produce a simple
test case.
Class compiles and program runs when using the signature/declaration of a pair
of functions as follows
////////////////////////////////////////////////////////////////////////
namespace detail {
enum class enabler {};
}
template<size_t M>
class Mesh
{
public:
template<size_t m=M, std::enable_if<m>=2, detail::enabler>::type...>
size_t yCells() const { return dimSize_[1]; }
template<size_t m=M, std::enable_if<m<2, detail::enabler>::type...>
size_t yCells() const { return 0; }
}
/////////////////////////////////////////////////////////////////////////
fails with
Two symbols with same comdat_group are not linked by the same_comdat_group
list.
template class Mesh<3>;
_ZNK4MeshILm3EE6yCellsEv/711 (size_t Mesh<meshDim>::yCells() const [with long
unsigned int meshDim = 3ul]) @address
Type: function definition analyzed
Visibility: forced_by_abi public weak comdat_group:_ZNK4MeshILm3EE6yCellsEv
one_only
previous sharing asm name: 710
References:
Referring:
First run: 0
Function flags: body
Called by:
Calls:
_ZN_ZNK4MeshILm3EE6yCellsEv/710 (size_t Mesh<meshDim>::yCells() const requires
predicate( true) [with long unsigned int meshDim = 3ul]) @0x7f20e64268a0
Type: function definition analyzed
Visibility: forced_by_abi public weak comdat_group:_ZNK4MeshILm3EE6yCellsEv
one_only
next sharing asm name: 711
References:
Referring:
First run: 0
Function flags: body
Called by:
Calls: _ZNKSt6vectorImSaImEEixEm/1078 (1.00 per call)
<...>/Mesh.cpp:183:23: internal compiler error: symtab_node::verify failed
0x904339 symtab_node::verify_symtab_nodes()
../../gcc-svn-sources/gcc/symtab.c:1126
when using either of
///////////////////////////////////////////
size_t yCells() const requires true { return dimSize_[1]; }
size_t yCells() const { return 0; }
///////////////////////////////////////////
template<size_t N>
concept bool Mesh2D() {
return N>=2;
}
template<size_t meshDim>
class Mesh
{
public:
size_t yCells() const requires Mesh2D<meshDim>() { return dimSize_[1]; }
size_t yCells() const { return 0; }
/////////////////////////////////////////////
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/68092] [possibly concepts] ICE: symtab_node::verify failed. Overloaded function by concept requires
2015-10-26 1:23 [Bug c++/68092] New: [possibly concepts] ICE: symtab_node::verify failed. Overloaded function by concept requires chrisb2244 at gmail dot com
@ 2015-10-26 1:24 ` chrisb2244 at gmail dot com
2015-10-26 1:34 ` chrisb2244 at gmail dot com
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: chrisb2244 at gmail dot com @ 2015-10-26 1:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68092
--- Comment #1 from Christian Butcher <chrisb2244 at gmail dot com> ---
Will keep working on a (non-compilable) test case. If someone is interested,
can upload full sources for this class
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/68092] [possibly concepts] ICE: symtab_node::verify failed. Overloaded function by concept requires
2015-10-26 1:23 [Bug c++/68092] New: [possibly concepts] ICE: symtab_node::verify failed. Overloaded function by concept requires chrisb2244 at gmail dot com
2015-10-26 1:24 ` [Bug c++/68092] " chrisb2244 at gmail dot com
2015-10-26 1:34 ` chrisb2244 at gmail dot com
@ 2015-10-26 1:34 ` chrisb2244 at gmail dot com
2015-10-26 1:34 ` chrisb2244 at gmail dot com
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: chrisb2244 at gmail dot com @ 2015-10-26 1:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68092
--- Comment #2 from Christian Butcher <chrisb2244 at gmail dot com> ---
Created attachment 36582
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36582&action=edit
main function (1/3)
First of 3 files to demonstrate problem. (Not)Compiled with g++ -std=c++1z
conceptFunctionOverload.cpp class.cpp
Errors with:
class.cpp:13:26: error: Two symbols with same comdat_group are not linked by
the same_comdat_group list.
template class myClass<1>;
^
_ZNK7myClassILm1EE3fooEv/493 (int myClass<N>::foo() const [with long unsigned
int N = 1ul]) @0x7f2e61df0b80
Type: function definition analyzed
Visibility: forced_by_abi public weak comdat_group:_ZNK7myClassILm1EE3fooEv
one_only
previous sharing asm name: 492
References: _ZSt4cout/1176
(addr)_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_/805 (addr)
Referring:
First run: 0
Function flags: body
Called by:
Calls: _ZNKSt6vectorIiSaIiEEixEm/807 (1.00 per call) _ZNSolsEPFRSoS_E/806
(1.00 per call) (can throw external) _ZNSolsEm/804 (1.00 per call) (can throw
external) _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc/803 (1.00 per
call) (can throw external)
_ZNK7myClassILm1EE3fooEv/492 (int myClass<N>::foo() const requires
predicate((ConceptTest<N>)()) [with long unsigned int N = 1ul]) @0x7f2e61df0a10
Type: function definition analyzed
Visibility: forced_by_abi public weak comdat_group:_ZNK7myClassILm1EE3fooEv
one_only
next sharing asm name: 493
References: _ZSt4cout/1176
(addr)_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_/805 (addr)
Referring:
First run: 0
Function flags: body
Called by:
Calls: _ZNKSt6vectorIiSaIiEEixEm/807 (1.00 per call) _ZNSolsEPFRSoS_E/806
(1.00 per call) (can throw external) _ZNSolsEm/804 (1.00 per call) (can throw
external) _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc/803 (1.00 per
call) (can throw external)
class.cpp:13:26: internal compiler error: symtab_node::verify failed
0x904339 symtab_node::verify_symtab_nodes()
../../gcc-svn-sources/gcc/symtab.c:1126
0x9169f5 symbol_table::compile()
../../gcc-svn-sources/gcc/cgraphunit.c:2377
0x919687 symbol_table::compile()
../../gcc-svn-sources/gcc/cgraphunit.c:2536
0x919687 symbol_table::finalize_compilation_unit()
../../gcc-svn-sources/gcc/cgraphunit.c:2562
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/68092] [possibly concepts] ICE: symtab_node::verify failed. Overloaded function by concept requires
2015-10-26 1:23 [Bug c++/68092] New: [possibly concepts] ICE: symtab_node::verify failed. Overloaded function by concept requires chrisb2244 at gmail dot com
2015-10-26 1:24 ` [Bug c++/68092] " chrisb2244 at gmail dot com
@ 2015-10-26 1:34 ` chrisb2244 at gmail dot com
2015-10-26 1:34 ` chrisb2244 at gmail dot com
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: chrisb2244 at gmail dot com @ 2015-10-26 1:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68092
--- Comment #4 from Christian Butcher <chrisb2244 at gmail dot com> ---
Created attachment 36584
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36584&action=edit
Class cpp
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/68092] [possibly concepts] ICE: symtab_node::verify failed. Overloaded function by concept requires
2015-10-26 1:23 [Bug c++/68092] New: [possibly concepts] ICE: symtab_node::verify failed. Overloaded function by concept requires chrisb2244 at gmail dot com
` (2 preceding siblings ...)
2015-10-26 1:34 ` chrisb2244 at gmail dot com
@ 2015-10-26 1:34 ` chrisb2244 at gmail dot com
2015-10-26 1:36 ` chrisb2244 at gmail dot com
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: chrisb2244 at gmail dot com @ 2015-10-26 1:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68092
--- Comment #3 from Christian Butcher <chrisb2244 at gmail dot com> ---
Created attachment 36583
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36583&action=edit
Class header
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/68092] [possibly concepts] ICE: symtab_node::verify failed. Overloaded function by concept requires
2015-10-26 1:23 [Bug c++/68092] New: [possibly concepts] ICE: symtab_node::verify failed. Overloaded function by concept requires chrisb2244 at gmail dot com
` (3 preceding siblings ...)
2015-10-26 1:34 ` chrisb2244 at gmail dot com
@ 2015-10-26 1:36 ` chrisb2244 at gmail dot com
2015-10-26 6:43 ` [Bug c++/68092] [C++1z] error: Two symbols with same comdat_group are not linked by the same_comdat_group list trippels at gcc dot gnu.org
2023-03-08 21:12 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: chrisb2244 at gmail dot com @ 2015-10-26 1:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68092
--- Comment #5 from Christian Butcher <chrisb2244 at gmail dot com> ---
Comment 2 has the wrong error (previous testcase with cout statements)
Correct error:
class.cpp:13:26: error: Two symbols with same comdat_group are not linked by
the same_comdat_group list.
template class myClass<1>;
^
_ZNK7myClassILm1EE3fooEv/493 (int myClass<N>::foo() const [with long unsigned
int N = 1ul]) @0x7f9a42be1b80
Type: function definition analyzed
Visibility: forced_by_abi public weak comdat_group:_ZNK7myClassILm1EE3fooEv
one_only
previous sharing asm name: 492
References:
Referring:
First run: 0
Function flags: body
Called by:
Calls: _ZNKSt6vectorIiSaIiEEixEm/803 (1.00 per call)
_ZNK7myClassILm1EE3fooEv/492 (int myClass<N>::foo() const requires
predicate((ConceptTest<N>)()) [with long unsigned int N = 1ul]) @0x7f9a42be1a10
Type: function definition analyzed
Visibility: forced_by_abi public weak comdat_group:_ZNK7myClassILm1EE3fooEv
one_only
next sharing asm name: 493
References:
Referring:
First run: 0
Function flags: body
Called by:
Calls: _ZNKSt6vectorIiSaIiEEixEm/803 (1.00 per call)
class.cpp:13:26: internal compiler error: symtab_node::verify failed
0x904339 symtab_node::verify_symtab_nodes()
../../gcc-svn-sources/gcc/symtab.c:1126
0x9169f5 symbol_table::compile()
../../gcc-svn-sources/gcc/cgraphunit.c:2377
0x919687 symbol_table::compile()
../../gcc-svn-sources/gcc/cgraphunit.c:2536
0x919687 symbol_table::finalize_compilation_unit()
../../gcc-svn-sources/gcc/cgraphunit.c:2562
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/68092] [C++1z] error: Two symbols with same comdat_group are not linked by the same_comdat_group list.
2015-10-26 1:23 [Bug c++/68092] New: [possibly concepts] ICE: symtab_node::verify failed. Overloaded function by concept requires chrisb2244 at gmail dot com
` (4 preceding siblings ...)
2015-10-26 1:36 ` chrisb2244 at gmail dot com
@ 2015-10-26 6:43 ` trippels at gcc dot gnu.org
2023-03-08 21:12 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-10-26 6:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68092
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-10-26
CC| |trippels at gcc dot gnu.org
Summary|[possibly concepts] ICE: |[C++1z] error: Two symbols
|symtab_node::verify failed. |with same comdat_group are
|Overloaded function by |not linked by the
|concept requires |same_comdat_group list.
Ever confirmed|0 |1
--- Comment #6 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
markus@x4 tmp % cat class.ii
template <int> bool ConceptTest();
template <int N> class A {
void foo() const requires ConceptTest<N>() {}
int foo() const {}
};
template class A<3>;
markus@x4 tmp % g++ -c -std=c++1z class.ii
class.ii:6:20: error: Two symbols with same comdat_group are not linked by the
same_comdat_group list.
template class A<3>;
^
_ZNK1AILi3EE3fooEv/1 (void A<N>::foo() const [with int N = 3]) @0x7f2d92c57170
Type: function definition analyzed
Visibility: forced_by_abi public weak comdat_group:_ZNK1AILi3EE3fooEv
one_only
previous sharing asm name: 0
References:
Referring:
First run: 0
Function flags: body
Called by:
Calls:
_ZNK1AILi3EE3fooEv/0 (void A<N>::foo() const requires
predicate((ConceptTest<N>)()) [with int N = 3]) @0x7f2d92c57000
Type: function definition analyzed
Visibility: forced_by_abi public weak comdat_group:_ZNK1AILi3EE3fooEv
one_only
next sharing asm name: 1
References:
Referring:
First run: 0
Function flags: body
Called by:
Calls:
class.ii:6:20: internal compiler error: symtab_node::verify failed
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/68092] [C++1z] error: Two symbols with same comdat_group are not linked by the same_comdat_group list.
2015-10-26 1:23 [Bug c++/68092] New: [possibly concepts] ICE: symtab_node::verify failed. Overloaded function by concept requires chrisb2244 at gmail dot com
` (5 preceding siblings ...)
2015-10-26 6:43 ` [Bug c++/68092] [C++1z] error: Two symbols with same comdat_group are not linked by the same_comdat_group list trippels at gcc dot gnu.org
@ 2023-03-08 21:12 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-03-08 21:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68092
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Even though 68608 is slightly newer, there is more analysis of what is going
wrong, marking this as a dup of bug 68608.
*** This bug has been marked as a duplicate of bug 68608 ***
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-03-08 21:12 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-26 1:23 [Bug c++/68092] New: [possibly concepts] ICE: symtab_node::verify failed. Overloaded function by concept requires chrisb2244 at gmail dot com
2015-10-26 1:24 ` [Bug c++/68092] " chrisb2244 at gmail dot com
2015-10-26 1:34 ` chrisb2244 at gmail dot com
2015-10-26 1:34 ` chrisb2244 at gmail dot com
2015-10-26 1:34 ` chrisb2244 at gmail dot com
2015-10-26 1:36 ` chrisb2244 at gmail dot com
2015-10-26 6:43 ` [Bug c++/68092] [C++1z] error: Two symbols with same comdat_group are not linked by the same_comdat_group list trippels at gcc dot gnu.org
2023-03-08 21:12 ` pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).