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

            Bug ID: 96444
           Summary: Incorrect satisfaction value of placeholder type
                    constraint on variable with non-dependent initializer
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ppalka at gcc dot gnu.org
  Target Milestone: ---

GCC 10.1, 10.2 and trunk fail to reject this invalid testcase.  The placeholder
type constraint on the local variable x after substitution ought to resolve to
the unsatisfied constraint Same<int, bool>.

$ cat testcase.C
template<typename T, typename U>
concept Same = __is_same(T, U);

template<typename T>
void foo() { Same<T> auto x = 0; }

void bar() { foo<bool>(); }

Reply via email to