pr77285-2.C: Require tls_native support.
[gcc.git] / gcc / testsuite / g++.dg / pr53037-4.C
1 /* PR c/53037. */
2 /* { dg-do compile } */
3 /* { dg-options "-O0" } */
4
5 int foo1 __attribute__((warn_if_not_aligned(8))); /* { dg-error "5:'warn_if_not_aligned' may not be specified for 'foo1'" } */
6
7 __attribute__((warn_if_not_aligned(8)))
8 void
9 foo2 (void) /* { dg-error "1:'warn_if_not_aligned' may not be specified for 'void foo2\\(\\)'" } */
10 {
11 }
12
13 struct foo3
14 {
15 int i : 2 __attribute__((warn_if_not_aligned(8))); /* { dg-error "7:'warn_if_not_aligned' may not be specified for 'i'" } */
16 };
17
18 typedef unsigned int __u32
19 __attribute__((aligned(4),warn_if_not_aligned(8)));
20
21 struct foo4
22 {
23 __u32 i : 2; /* { dg-error "9:cannot declare bit-field 'i' with 'warn_if_not_aligned' type" } */
24 };