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

            Bug ID: 95951
           Summary: ICE in extract_call_expr, at cp/call.c:6614
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bence.kodaj at gmail dot com
  Target Milestone: ---

The following code causes an ICE in extract_call_expr, at cp/call.c:6614:

----------------------
#include <array>

template< std::size_t N >
struct StrLiteral
{
    const std::array< char, N > _str;

    consteval StrLiteral( const char ( &a )[ N ] )
    : _str{ std::to_array( a ) }
    {}

    consteval auto operator == ( const StrLiteral & other ) const { return _str
== other._str; }
};


const auto e = StrLiteral( "a" ) == StrLiteral( "b" );
----------------------

Godbolt URL: https://godbolt.org/z/VaKHKh

OS: Ubuntu 18.04

Reply via email to