From: Richard Sandiford Date: Mon, 2 Oct 2023 06:20:45 +0000 (+0100) Subject: Fix profiledbootstrap poly_int fallout [PR111642] X-Git-Tag: basepoints/gcc-15~5780 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e465e5e4a969334f64cf0d6611de5273d73ea732;p=thirdparty%2Fgcc.git Fix profiledbootstrap poly_int fallout [PR111642] 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::run): Use a local poly_int64 typedef. * simplify-rtx.cc (simplify_const_poly_int_tests::run): Likewise. --- diff --git a/gcc/rtl-tests.cc b/gcc/rtl-tests.cc index ae8669419b60..96656c54a487 100644 --- a/gcc/rtl-tests.cc +++ b/gcc/rtl-tests.cc @@ -246,6 +246,7 @@ template void const_poly_int_tests::run () { + using poly_int64 = poly_int; rtx x1 = gen_int_mode (poly_int64 (1, 1), QImode); rtx x255 = gen_int_mode (poly_int64 (1, 255), QImode); diff --git a/gcc/simplify-rtx.cc b/gcc/simplify-rtx.cc index 170406aa28b3..bd9443dbcc28 100644 --- a/gcc/simplify-rtx.cc +++ b/gcc/simplify-rtx.cc @@ -8689,6 +8689,7 @@ template void simplify_const_poly_int_tests::run () { + using poly_int64 = poly_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);