stdalign tests: Skip the test when compiled by Sun C.
authorBruno Haible <bruno@clisp.org>
Sun, 6 Nov 2011 22:54:47 +0000 (23:54 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 6 Nov 2011 22:57:46 +0000 (23:57 +0100)
* tests/test-stdalign.c (main): Skip the test on Sun C.

ChangeLog
tests/test-stdalign.c

index e109661..cf27a75 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2011-11-06  Bruno Haible  <bruno@clisp.org>
 
+       stdalign tests: Skip the test when compiled by Sun C.
+       * tests/test-stdalign.c (main): Skip the test on Sun C.
+
+2011-11-06  Bruno Haible  <bruno@clisp.org>
+
        ansi-c++-opt: Complete the 2011-06-05 change.
        * m4/ansi-c++.m4 (gl_PROG_ANSI_CXX): When a C++ compiler is found but
        does not support namespaces, set the variable to "no", not to ":".
index 66a2040..7090a26 100644 (file)
@@ -80,6 +80,11 @@ CHECK_STATIC (struct4);
 int
 main ()
 {
+#if defined __SUNPRO_C
+  /* Avoid a test failure due to Sun Studio Developer Bug Report #2125432.  */
+  fputs ("Skipping test: known Sun C compiler bug\n", stderr);
+  return 77;
+#else
   CHECK_ALIGNED (static_char_alignas);
   CHECK_ALIGNED (static_char_Alignas);
   CHECK_ALIGNED (static_short_alignas);
@@ -88,10 +93,10 @@ main ()
   CHECK_ALIGNED (static_int_Alignas);
   CHECK_ALIGNED (static_long_alignas);
   CHECK_ALIGNED (static_long_Alignas);
-#ifdef INT64_MAX
+# ifdef INT64_MAX
   CHECK_ALIGNED (static_int64_t_alignas);
   CHECK_ALIGNED (static_int64_t_Alignas);
-#endif
+# endif
   CHECK_ALIGNED (static_float_alignas);
   CHECK_ALIGNED (static_float_Alignas);
   CHECK_ALIGNED (static_double_alignas);
@@ -107,4 +112,5 @@ main ()
   CHECK_ALIGNED (static_struct4_alignas);
   CHECK_ALIGNED (static_struct4_Alignas);
   return 0;
+#endif
 }