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

--- Comment #7 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
If I try to build the file with `clang++-16` I'm getting the following error:

In file included from /home/slyfox/dev/git/gcc/gcc/rtl-tests.cc:22:
In file included from /home/slyfox/dev/git/gcc/gcc/coretypes.h:480:
/home/slyfox/dev/git/gcc/gcc/poly-int.h:453:14: error: excess elements in array
initializer
  : coeffs { (typename poly_coeff_traits<C>::
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/slyfox/dev/git/gcc/gcc/poly-int.h:438:5: note: in instantiation of
function template specialization 'poly_int<1, long>::poly_int<int, int>'
requested here
  : poly_int (typename poly_int_fullness<sizeof... (Cs) >= N>::type (),
    ^
/home/slyfox/dev/git/gcc/gcc/rtl-tests.cc:249:26: note: in instantiation of
function template specialization 'poly_int<1, long>::poly_int<int, int>'
requested here
  rtx x1 = gen_int_mode (poly_int64 (1, 1), QImode);
                         ^

Which sounds like we should not try to create polynomials with values more than
`NUM_POLY_INT_COEFFS` (== 1 on x86_64).

I'm still not sure if the templates are expected to defer build failure in this
case or it's a c++ syntax error in gcc's code.

Reply via email to