https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102307
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2021-09-13 00:00:00 |
Target Milestone|--- |10.4
Summary|internal compiler error: in |[10/11/12 Regression]
|reshape_init_r, at |internal compiler error: in
|cp/decl.c:6717 since |reshape_init_r, at
|r10-6388-ge98ebda074bf8fc5 |cp/decl.c:6717
Status|NEW |UNCONFIRMED
Ever confirmed|1 |0
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I think this is invalid code. Making the code aceppted by clang (and ICC), GCC
does not ICE.
GCC 9 just to produce an error message:
<source>: In function 'int main()':
<source>:7:75: error: call to non-'constexpr' function 'Matrix<N,
M>::Matrix(const double (&)[N][M]) [with unsigned int N = 2; unsigned int M =
3]'
7 | int main() { constexpr Matrix<2, 3> mat{{{1.0, 2.0, 3.0}, {4.0, 5.0,
6.0}}}; }
|