install-reloc: Support multi-binary installation.
[gnulib.git] / tests / test-stdalign.c
index c1d8677..373bf98 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <stdalign.h>.
-   Copyright 2009-2011 Free Software Foundation, Inc.
+   Copyright 2009-2013 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -43,7 +43,9 @@ verify (__alignas_is_defined == 1);
 # ifndef alignas
 #  error "alignas is not a macro"
 # endif
-# define TEST_ALIGNMENT 16
+/* mingw can go up only to 8.  8 is all that GNU Emacs needs, so let's
+   limit the test to 8 for now.  */
+# define TEST_ALIGNMENT 8
 #else
 # define _Alignas(alignment)
 # define alignas(alignment)
@@ -69,7 +71,7 @@ CHECK_STATIC (int64_t);
 #endif
 CHECK_STATIC (float);
 CHECK_STATIC (double);
-CHECK_STATIC (longdouble);
+/* CHECK_STATIC (longdouble); */
 CHECK_STATIC (struct1);
 CHECK_STATIC (struct2);
 CHECK_STATIC (struct3);
@@ -78,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);
@@ -86,16 +93,16 @@ 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);
   CHECK_ALIGNED (static_double_Alignas);
-  CHECK_ALIGNED (static_longdouble_alignas);
-  CHECK_ALIGNED (static_longdouble_Alignas);
+  /* CHECK_ALIGNED (static_longdouble_alignas); */
+  /* CHECK_ALIGNED (static_longdouble_Alignas); */
   CHECK_ALIGNED (static_struct1_alignas);
   CHECK_ALIGNED (static_struct1_Alignas);
   CHECK_ALIGNED (static_struct2_alignas);
@@ -105,4 +112,5 @@ main ()
   CHECK_ALIGNED (static_struct4_alignas);
   CHECK_ALIGNED (static_struct4_Alignas);
   return 0;
+#endif
 }