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

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).