On Thu, 5 Nov 2026 15:36:08 GMT, Jorn Vernee <[email protected]> wrote:
>> Hi @JornVernee, as usual, things are more complicated on AIX ;-) >> >> >> TestCanonicalLayouts::testCanonicalLayout '[2] char' >> org.opentest4j.AssertionFailedError: expected: <true> but was: <false> >> >> We are currently building with `-fsigned-char`. I guess the removal was >> forgotten. linux on ppc64(le) doesn't use that. I'll create a separate PR to >> remove it. >> >> >> TestCanonicalLayouts::testCanonicalLayout '[13] double' >> org.opentest4j.AssertionFailedError: expected: <4> but was: <8> >> >> AIX has different alignment rules for `double`. We have already modified >> other tests to use 8 Byte alignment. So, my suggestion is: >> >> diff --git a/test/jdk/java/foreign/canonicallayouts/libCanonicalLayouts.c >> b/test/jdk/java/foreign/canonicallayouts/libCanonicalLayouts.c >> index eea98f2dc22..e6833b2ac19 100644 >> --- a/test/jdk/java/foreign/canonicallayouts/libCanonicalLayouts.c >> +++ b/test/jdk/java/foreign/canonicallayouts/libCanonicalLayouts.c >> @@ -21,6 +21,12 @@ >> * questions. >> */ >> >> +#ifdef _AIX >> +// The JDK prefers linux compatible double alignment by default. >> +// Also see usage of #pragma align (natural) >> +typedef double linux_double __attribute__((aligned(8))); >> +#endif >> + >> #include "export.h" >> >> #include <stdint.h> >> @@ -48,7 +54,11 @@ CHECKS_ALL(T, NAME) \ >> >> CHECKS_ALL(bool, bool) >> CHECKS_ALL(float, float) >> +#ifdef _AIX >> +CHECKS_ALL(linux_double, double) >> +#else >> CHECKS_ALL(double, double) >> +#endif >> CHECKS_ALL(void*, void_star) >> >> CHECKS_INTEGRAL(char, char) > > @TheRealMDoerr Thanks for testing! I've added your patch for AIX Thanks @JornVernee and @TheRealMDoerr for working on this! ------------- PR Comment: https://git.openjdk.org/jdk/pull/33417#issuecomment-7169985192
