> On 13 Nov 2018, at 19:31, Dominique d'Humières <[email protected]> wrote:
>
> Revision r266072 breaks bootstrap on darwin:
>
> In file included from ../../work/gcc/coretypes.h:430,
> from ../../work/gcc/tree-vect-data-refs.c:24:
> ../../work/gcc/poly-int.h: In instantiation of 'typename if_nonpoly<Ca,
> bool>::type maybe_lt(const Ca&, const poly_int_pod<N, Cb>&) [with unsigned
> int N = 1; Ca = int; Cb = long long unsigned int; typename if_nonpoly<Ca,
> bool>::type = bool]':
> ../../work/gcc/tree-vect-data-refs.c:6338:13: required from here
> ../../work/gcc/poly-int.h:1384:12: error: comparison of integer expressions
> of different signedness: 'const int' and 'const long long unsigned int'
> [-Werror=sign-compare]
> 1384 | return a < b.coeffs[0];
> | ~~^~~~~~~~~~~
> cc1plus: all warnings being treated as errors
It’s not immediately obvious why there aren’t more folks with bootstrap fails -
grep says that MAX_OFILE_ALIGNMENT is defined in a similar way for many targets.
I’m testing this (almost obvious) fix:
(nit: the else case line also needs wrapping [81chars]) :
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index 1cc0320..deb7121 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -6335,7 +6335,8 @@ vect_can_force_dr_alignment_p (const_tree decl,
poly_uint64 alignment)
return false;
if (TREE_STATIC (decl))
- return (known_le (alignment, MAX_OFILE_ALIGNMENT));
+ return (known_le (alignment,
+ (unsigned HOST_WIDE_INT) MAX_OFILE_ALIGNMENT));
else
return (known_le (alignment, (unsigned HOST_WIDE_INT)
MAX_STACK_ALIGNMENT));
}
OK?
Iain