summaryrefslogtreecommitdiffstats
path: root/test/Headers/max_align.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Headers/max_align.c')
-rw-r--r--test/Headers/max_align.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Headers/max_align.c b/test/Headers/max_align.c
new file mode 100644
index 0000000000..283a7a8770
--- /dev/null
+++ b/test/Headers/max_align.c
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -fsyntax-only -std=c11 -verify %s
+// expected-no-diagnostics
+
+// XFAIL: windows-
+
+#ifndef __BIGGEST_ALIGNMENT__
+#error __BIGGEST_ALIGNMENT__ not defined
+#endif
+
+#include <stddef.h>
+
+_Static_assert(__BIGGEST_ALIGNMENT__ == _Alignof(max_align_t), "");