On Wed, Nov 06, 2024 at 09:38:21AM -0800, Andrew Pinski wrote: > > + for (const char *c = getenv ("OFFLOAD_TARGET_NAMES"); c;) > > + { > > + if (startswith (c, "amdgcn")) > > + return ordered_max (64, omp_max_vf (false)); > > This causes a bootstrap failure for me (and others) on x86_64-linux-gnu: > > In file included from ../../src-master/gcc/coretypes.h:497, > from ../../src-master/gcc/omp-general.cc:25: > ../../src-master/gcc/poly-int.h: In instantiation of ‘typename > if_nonpoly<Cb, bool>::type maybe_lt(const poly_int<N, C>&, const Cb&) > [with unsigned int N = 1; Ca = long unsigned int; Cb = int; typename > if_nonpoly<Cb, bool>::type = bool]’: > ../../src-master/gcc/poly-int.h:1440:7: required from ‘poly_int<N, > typename poly_result<typename if_nonpoly<Ca>::type, Cb>::type> > ordered_max(const Ca&, const poly_int<N, Cb>&) [with unsigned int N = > 1; Ca = int; Cb = long unsigned int; typename poly_result<typename > if_nonpoly<Ca>::type, Cb>::type = long unsigned int; typename > if_nonpoly<Ca>::type = int]’ > 1342 | #define maybe_gt(A, B) maybe_lt (B, A) > | ~~~~~~~~~^~~~~~ > ../../src-master/gcc/omp-general.cc:1008:25: required from here > 1008 | return ordered_max (64, omp_max_vf (false)); > | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ > ../../src-master/gcc/poly-int.h:1317:22: error: comparison of integer > expressions of different signedness: ‘const long unsigned int’ and > ‘const int’ [-Werror=sign-compare] > 1317 | return a.coeffs[0] < b; > | ~~~~~~~~~~~~^~~ > ../../src-master/gcc/poly-int.h: In instantiation of ‘typename > if_nonpoly<Ca, bool>::type maybe_lt(const Ca&, const poly_int<N, Cb>&) > [with unsigned int N = 1; Ca = int; Cb = long unsigned int; typename > if_nonpoly<Ca, bool>::type = bool]’: > ../../src-master/gcc/poly-int.h:1445:2: required from ‘poly_int<N, > typename poly_result<typename if_nonpoly<Ca>::type, Cb>::type> > ordered_max(const Ca&, const poly_int<N, Cb>&) [with unsigned int N = > 1; Ca = int; Cb = long unsigned int; typename poly_result<typename > if_nonpoly<Ca>::type, Cb>::type = long unsigned int; typename > if_nonpoly<Ca>::type = int]’ > 1342 | #define maybe_gt(A, B) maybe_lt (B, A) > | ~~~~~~~~~^~~~~~ > ../../src-master/gcc/omp-general.cc:1008:25: required from here > 1008 | return ordered_max (64, omp_max_vf (false)); > | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ > ../../src-master/gcc/poly-int.h:1328:12: error: comparison of integer > expressions of different signedness: ‘const int’ and ‘const long > unsigned int’ [-Werror=sign-compare] > 1328 | return a < b.coeffs[0]; > | ~~^~~~~~~~~~~
Guess we need ordered_max (uint64_t (64), omp_max_vf (false)) or something similar. Jakub