This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/86269] New: ICE with intermediate concepts notation


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

            Bug ID: 86269
           Summary: ICE with intermediate concepts notation
           Product: gcc
           Version: c++-concepts
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: h2+bugs at fsfe dot org
  Target Milestone: ---

The following small example which is valid according to the current draft
standard (not just the Concepts TS, with the exception of the bool keyword):

#include <type_traits>

template <typename t2, typename t = std::remove_reference_t<t2>>
concept bool IntegralOrIntegralRef = std::is_integral_v<t>;

template <IntegralOrIntegralRef t>
auto foo(t && v)
{
    return v;
}

int main()
{
    int i = 7;
    return foo(i);
}


produces:

% g++7 -std=c++17 -fconcepts test.cpp
test.cpp:6:11: internal compiler error: in tsubst, at cp/pt.c:13657
 template <IntegralOrIntegralRef t>
           ^~~~~~~~~~~~~~~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.

Checked versions:
g++7 (FreeBSD Ports Collection) 7.3.1 20180607
g++8 (FreeBSD Ports Collection) 8.1.1 20180615
g++9 (FreeBSD Ports Collection) 9.0.0 20180610 (experimental)

Thanks for your work on GCC!

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]