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

            Bug ID: 93279
           Summary: [9 Regression] Template substitution ICE
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dje at gcc dot gnu.org
  Target Milestone: ---

Created attachment 47659
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47659&action=edit
C++ source code example that produces error

From Twitter (https://twitter.com/aozhanmuh/status/1217249292395720705)
and Compiler Explorer (https://godbolt.org/z/5HjwcN)

<source>: In substitution of 'template<class T, long unsigned int N>
template<class Other, typename std::enable_if<(array_depth_v<math::array<T, N>
> > array_depth_v<Other>), std::nullptr_t>::type <anonymous> > constexpr
math::array<T, N> math::array<T, N>::operator*(const Other&) const [with Other
= <missing>; typename std::enable_if<(array_depth_v<math::array<T, N> > >
array_depth_v<Other>), std::nullptr_t>::type <anonymous> = <missing>; T =
float; long unsigned int N = <missing>]':

<source>:56:36:   required from 'constexpr math::array<T, N> math::array<T,
N>::operator*(const Other&) const [with Other = float; typename
std::enable_if<(array_depth_v<math::array<T, N> > > array_depth_v<Other>),
std::nullptr_t>::type <anonymous> = nullptr; T = math::array<float, 4>; long
unsigned int N = 1]'

<source>:79:20:   required from here

<source>:48:5: internal compiler error: unexpected expression 'N' of kind
template_parm_index

   48 |    (array_depth_v<array> > array_depth_v<Other>),

      |     ^~~~~~~~~~~~~~~~~~~~

Please submit a full bug report,

with preprocessed source if appropriate.

See <https://gcc.gnu.org/bugs/> for instructions.

Compiler returned: 1

Reply via email to