[NDS32] Add intrinsic functions for TLB operation and data prefech.
[official-gcc.git] / gcc / testsuite / gcc.dg / Wattributes-7.c
blob0904742b01d03b4f8842af0c22e98bb59edf9723
1 /* PR c/81566 - invalid attribute aligned accepted on functions
2 { dg-do compile }
3 { dg-options "-Wall -Wattributes -ftrack-macro-expansion=0" } */
5 #define ATTR(list) __attribute__ (list)
6 #define ALIGN(n) ATTR ((aligned (n)))
8 /* It's okay to increase the alignment of a function. */
10 void ALIGN (16) ALIGN (32)
11 falign32_1 (void);
13 void ALIGN (16) falign32_2 (void);
14 void ALIGN (32) falign32_2 (void);
16 void falign32_2 (void) { }
18 void ALIGN (32) falign32_2 (void);
20 /* It's not okay to decrease it. */
22 void ALIGN (32) ALIGN (16)
23 falign64_3 (void); /* { dg-warning "ignoring attribute .aligned \\(16\\). because it conflicts with attribute .aligned \\(32\\)." } */
25 void ALIGN (32)
26 falign64_3 (void);
28 void falign64_3 (void);
30 void falign64_3 (void) { }
33 void ALIGN (32)
34 falign64_4 (void); /* { dg-message "previous declaration here" } */
36 void ALIGN (16)
37 falign64_4 (void); /* { dg-warning "ignoring attribute .aligned \\(16\\). because it conflicts with attribute .aligned \\(32\\)." } */
39 void ALIGN (32)
40 falign64_4 (void); /* { dg-message "previous declaration here" } */
42 void ALIGN (16)
43 falign64_4 (void); /* { dg-warning "ignoring attribute .aligned \\(16\\). because it conflicts with attribute .aligned \\(32\\)." } */
45 void ALIGN (64)
46 falign64_4 (void);
48 void ALIGN (32)
49 falign64_4 (void); /* { dg-warning "ignoring attribute .aligned \\(32\\). because it conflicts with attribute .aligned \\(64\\)." } */
51 void falign64_4 (void);
53 void ALIGN (64)
54 falign64_4 (void) { }
56 void falign64_4 (void);
58 void ALIGN (64)
59 falign64_4 (void);
62 void ATTR ((aligned (16), aligned (32)))
63 falign64_5 (void);
65 void ATTR ((aligned (32), aligned (64)))
66 falign64_5 (void);
68 void ATTR ((aligned (16), aligned (32), aligned (64)))
69 falign64_5 (void); /* { dg-warning "ignoring attribute .aligned \\(16\\). because it conflicts with attribute .aligned \\(64\\)." } */
70 /* { dg-warning "ignoring attribute .aligned \\(32\\). because it conflicts with attribute .aligned \\(64\\)." "" { target *-*-* } .-1 } */
73 void ATTR ((aligned (16), aligned (32), aligned (16)))
74 falign64_6 (void); /* { dg-warning "ignoring attribute .aligned \\(16\\). because it conflicts with attribute .aligned \\(32\\)." } */