On Wed, Feb 24, 2016 at 07:37:56AM -0700, Martin Sebor wrote:
On 02/24/2016 03:12 AM, Dominique d'Humières wrote:
The test gcc.dg/builtins-68.c fails on x86_64-apple-darwin15:
Thanks for the heads up. I see it also fails on i686-pc-linux-gnu
and likely other 32-bit targets for similar reasons. Let me adjust
it today.
The last argument is size_t, which is unsigned int on some targets, unsigned
long on others, unsigned long long on others.
Thus perpaps you want to turn those
p = __builtin_alloca_with_align (n, LONG_MAX); /* { dg-error "must be a constant integer" } */
p = __builtin_alloca_with_align (n, ~0LU); /* { dg-error "must be a constant integer" } */
p = __builtin_alloca_with_align (n, 1LLU << 34); /* { dg-error "must be a constant integer" } */
p = __builtin_alloca_with_align (n, LLONG_MAX); /* { dg-error "must be a constant integer" } */
p = __builtin_alloca_with_align (n, ~0LLU); /* { dg-error "must be a constant integer" } */
tests into
... (n, (size_t) (sizeof (size_t) >= sizeof (long) ? LONG_MAX : 0))
and similarly for the others?
I.e. if size_t is big enough, test it, otherwise still generate the error, but for some other reason?