[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnulib:test-stdalign failing on powerpc-darwin8, gcc-4.0

From: David Fang
Subject: gnulib:test-stdalign failing on powerpc-darwin8, gcc-4.0
Date: Mon, 15 Dec 2014 20:39:22 -0500 (EST)

I initially reported a this as a GNUTLS-3.3.9 test failure, but was then redirected to the gnulib project, the origin of this test.


I'm getting 1 test failure on powerpc-darwin8 with test-stdalign.
Compiled with the system compiler, Apple's gcc-4.0.

% ./test-stdalign
test-stdalign.c:88: assertion '(uintptr_t) &(static_char_alignas) % TEST_ALIGNMENT == 0' failed

I locally changed the CHECK_ALIGNED macro to print, and I see the following:

#define CHECK_ALIGNED(var) printf( #var " %d\n", (uintptr_t) &(var) % TEST_ALIGNMENT )

static_char_alignas 5
static_char_Alignas 4
static_short_alignas 2
static_short_Alignas 0
static_int_alignas 4
static_int_Alignas 0
static_long_alignas 4
static_long_Alignas 0
static_int64_t_alignas 0
static_int64_t_Alignas 0
static_float_alignas 4
static_float_Alignas 0
static_double_alignas 0
static_double_Alignas 0
static_struct1_alignas 5
static_struct1_Alignas 4
static_struct2_alignas 0
static_struct2_Alignas 6
static_struct3_alignas 0
static_struct3_Alignas 4
static_struct4_alignas 0
static_struct4_Alignas 4

powerpc-darwin is known to have some unconventional data structure alignment rules in its ABI. How should these results be interpreted? Is there a problem in the compiler, or rather some incorrect assumption about the ABI in the test itself? This is the system compiler, after all.

Thanks for any insights.


David Fang

reply via email to

[Prev in Thread] Current Thread [Next in Thread]