diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/c11-align-9.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/c11-align-9.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/c11-align-9.c b/gcc/testsuite/gcc.dg/c11-align-9.c new file mode 100644 index 0000000..3c9cf55 --- /dev/null +++ b/gcc/testsuite/gcc.dg/c11-align-9.c @@ -0,0 +1,9 @@ +/* Test C11 alignment support. Test reducing alignment (assumes there + are at least some alignment constraints), case of compound literals. */ +/* { dg-do compile } */ +/* { dg-options "-std=c11 -pedantic-errors" } */ +/* { dg-skip-if "no alignment constraints" { "avr-*-*" } } */ + +#include <stddef.h> + +max_align_t *p = &(_Alignas (_Alignof (char)) max_align_t) { 1 }; /* { dg-error "reduce alignment" } */ |