1 /* { dg-do compile } */
2 /* { dg-options "" } */
4 #define CONCAT_(A,B) A ## B
5 #define CONCAT(A,B) CONCAT_(A,B)
7 #define ATTR __attribute__((AT))
8 #define ATSYM(suf) CONCAT (AT, CONCAT_ (_, suf))
12 typedef int ATSYM(type
) ATTR
; /* { dg-warning "attribute ignored" } */
14 typedef int (*ATSYM(fntype
))(void) ATTR
; /* { dg-warning "attribute ignored" } */
16 struct ATSYM(struct) {
17 char dummy ATTR
; /* { dg-warning "attribute ignored" } */
18 } ATTR
; /* { dg-warning "does not apply to types" } */
20 int ATSYM(var
) ATTR
; /* { dg-warning "attribute ignored" } */
22 int ATSYM(fn_knrarg
) (arg
)
23 int arg ATTR
; /* { dg-warning "attribute ignored" } */
26 int ATSYM(fn_isoarg
) (int arg ATTR
) { return 0; } /* { dg-warning "attribute ignored" } */
28 int ATSYM(fn_vars
) (void) {
29 static int svar ATTR
; /* { dg-warning "attribute ignored" } */
30 auto int lvar ATTR
; /* { dg-warning "attribute ignored" } */
38 typedef int ATSYM(type
) ATTR
; /* used attribute is no longer
41 typedef int (*ATSYM(fntype
))(void) ATTR
; /* used attribute is no
44 struct ATSYM(struct) {
45 char dummy ATTR
; /* { dg-warning "attribute ignored" } */
46 } ATTR
; /* { dg-warning "does not apply to types" } */
50 int ATSYM(fn_knrarg
) (arg
)
51 int arg ATTR
; /* { dg-warning "attribute ignored" } */
54 int ATSYM(fn_isoarg
) (int arg ATTR
) { return 0; } /* { dg-warning "attribute ignored" } */
56 int ATSYM(fn_vars
) (void) {
58 auto int lvar ATTR
; /* { dg-warning "attribute ignored" } */
64 /* These are invalid on all targets. Applying to PARM_ or FIELD_DECL
65 also caused a tree checking ice on targets that support weak, */
69 typedef int ATSYM(type
) ATTR
; /* { dg-warning "attribute ignored" } */
71 typedef int (*ATSYM(fntype
))(void) ATTR
; /* { dg-warning "attribute ignored" } */
73 struct ATSYM(struct) {
74 char dummy ATTR
; /* { dg-warning "attribute ignored" } */
77 int ATSYM(fn_knrarg
) (arg
)
78 int arg ATTR
; /* { dg-warning "attribute ignored" } */
81 int ATSYM(fn_isoarg
) (int arg ATTR
) { return 0; } /* { dg-warning "attribute ignored" } */
85 /* These are invalid on all targets. Applying to PARM_ or FIELD_DECL
86 also caused a tree checking ice on targets that support dllimport. */
90 typedef int ATSYM(type
) ATTR
; /* { dg-warning "attribute |directive ignored" } */
92 typedef int (*ATSYM(fntype
))(void) ATTR
; /* { dg-warning "attribute |directive ignored" } */
94 struct ATSYM(struct) {
95 char dummy ATTR
; /* { dg-warning "attribute |directive ignored" } */
98 int ATSYM(fn_knrarg
) (arg
)
99 int arg ATTR
; /* { dg-warning "attribute |directive ignored" } */
102 int ATSYM(fn_isoarg
) (int arg ATTR
) { return 0; } /* { dg-warning "attribute |directive ignored" } */