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

            Bug ID: 87768
           Summary: ICE in tsubst_copy_and_build, at cp/pt.c:19002 when
                    using concepts
           Product: gcc
           Version: 8.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gcc-bugs at marehr dot dialup.fu-berlin.de
  Target Milestone: ---

Hello gcc-team,

compiling this program with `g++-8 -fconcepts -std=c++17 concept_ice.cpp`

```
struct a {};
template <bool> using b = a;

template <typename> struct c;
template <typename d>
  requires requires(d e) { e[0]; }
struct c<d> {
  static constexpr bool f = [] { return false; }();
};

struct g : b<c<unsigned[]>::f> {};

```

yields this ICE:

```
concept_ice.cpp: In instantiation of ‘constexpr const bool c<unsigned int
[]>::f’:
concept_ice.cpp:11:29:   required from here
concept_ice.cpp:6:29: internal compiler error: in tsubst_copy_and_build, at
cp/pt.c:19002
   requires requires(d e) { e[0]; }
                            ~^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.
```


g++-7.3.1 compiles this just fine.

Thank you for your work!

Reply via email to