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

            Bug ID: 95386
           Summary: internal compiler error: in satisfaction_value, while
                    compiling function with a requires clause
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jpalecek at web dot de
  Target Milestone: ---

Created attachment 48627
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48627&action=edit
C-reduced code reproducing the problem

Hello,

while trying to call a function with this signature

template <class T>
void g(T&& a) requires !std::is_lvalue_reference<T>()

I get an internal compiler error:


rref-test.cpp:48:6: internal compiler error: in satisfaction_value, at
cp/constraint.cc:2503
   48 |   g(a);

This doesn't happen if I don't use the implicit conversion to bool in the
requires clause:

template <class T>
void g(T&& a) requires !std::is_lvalue_reference<T>::value

is OK.

The minimized (C-reduced) reproducing code is in the attachment. It is a bit
funny as it is not syntactically a complete program, but does reproduce the
problem anyway.

Reply via email to