]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix profiledbootstrap poly_int fallout [PR111642]
authorRichard Sandiford <richard.sandiford@arm.com>
Mon, 2 Oct 2023 06:20:45 +0000 (07:20 +0100)
committerRichard Sandiford <richard.sandiford@arm.com>
Mon, 2 Oct 2023 06:20:45 +0000 (07:20 +0100)
rtl-tests.cc and simplify-rtx.cc used partial specialisation
to try to restrict the NUM_POLY_INT_COEFFS>1 tests without
resorting to preprocessor tests.  That now triggers an error
in some configurations, since the NUM_POLY_INT_COEFFS>1 tests
used the global poly_int64, whose definition does not depend
on the template parameter.

This patch uses local types that do depend on the template parameter.

gcc/
PR bootstrap/111642
* rtl-tests.cc (const_poly_int_tests<N>::run): Use a local
poly_int64 typedef.
* simplify-rtx.cc (simplify_const_poly_int_tests<N>::run): Likewise.

gcc/rtl-tests.cc
gcc/simplify-rtx.cc

index ae8669419b6054364b7c3b8e2dd3452f039a4597..96656c54a487e563e78f5fc65d51ad2eedd1888b 100644 (file)
@@ -246,6 +246,7 @@ template<unsigned int N>
 void
 const_poly_int_tests<N>::run ()
 {
+  using poly_int64 = poly_int<N, HOST_WIDE_INT>;
   rtx x1 = gen_int_mode (poly_int64 (1, 1), QImode);
   rtx x255 = gen_int_mode (poly_int64 (1, 255), QImode);
 
index 170406aa28b359de6735f9e89bf4b99827f2b026..bd9443dbcc28f038e8df08db8bc10122912dab30 100644 (file)
@@ -8689,6 +8689,7 @@ template<unsigned int N>
 void
 simplify_const_poly_int_tests<N>::run ()
 {
+  using poly_int64 = poly_int<N, HOST_WIDE_INT>;
   rtx x1 = gen_int_mode (poly_int64 (1, 1), QImode);
   rtx x2 = gen_int_mode (poly_int64 (-80, 127), QImode);
   rtx x3 = gen_int_mode (poly_int64 (-79, -128), QImode);