diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2023-10-02 07:20:45 +0100 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2023-10-02 07:20:45 +0100 |
commit | e465e5e4a969334f64cf0d6611de5273d73ea732 (patch) | |
tree | 79cb538e483ca276eb73a0ade11d40fe66eabcc8 /gcc | |
parent | 9464e72bcc9123b619215af8cfef491772a3ebd9 (diff) | |
download | gcc-e465e5e4a969334f64cf0d6611de5273d73ea732.zip gcc-e465e5e4a969334f64cf0d6611de5273d73ea732.tar.gz gcc-e465e5e4a969334f64cf0d6611de5273d73ea732.tar.bz2 |
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<N>::run): Use a local
poly_int64 typedef.
* simplify-rtx.cc (simplify_const_poly_int_tests<N>::run): Likewise.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rtl-tests.cc | 1 | ||||
-rw-r--r-- | gcc/simplify-rtx.cc | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/gcc/rtl-tests.cc b/gcc/rtl-tests.cc index ae86694..96656c5 100644 --- a/gcc/rtl-tests.cc +++ b/gcc/rtl-tests.cc @@ -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); diff --git a/gcc/simplify-rtx.cc b/gcc/simplify-rtx.cc index 170406a..bd9443d 100644 --- a/gcc/simplify-rtx.cc +++ b/gcc/simplify-rtx.cc @@ -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); |