OSDN Git Service

PR target/28648 c:
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / attr-invalid.c
index c6c437d..7d1c151 100644 (file)
@@ -77,3 +77,24 @@ int ATSYM(fn_knrarg) (arg)
 { return 0; }
 
 int ATSYM(fn_isoarg) (int arg ATTR) { return 0; } /* { dg-warning "attribute ignored" "" } */
+
+
+/* PR target/28648  */
+/* These are invalid on all targets.  Applying to PARM_ or FIELD_DECL
+   also caused a tree checking ice on targets that support dllimport.  */
+#undef AT
+#define AT dllimport
+
+typedef int ATSYM(type) ATTR; /* { dg-warning "attribute ignored" "" } */
+
+typedef int (*ATSYM(fntype))(void) ATTR; /* { dg-warning "attribute ignored" "" } */
+
+struct ATSYM(struct) {
+  char dummy ATTR; /* { dg-warning "attribute ignored" "" } */
+};
+
+int ATSYM(fn_knrarg) (arg)
+  int arg ATTR; /* { dg-warning "attribute ignored" "" } */
+{ return 0; }
+
+int ATSYM(fn_isoarg) (int arg ATTR) { return 0; } /* { dg-warning "attribute ignored" "" } */