else if (FieldDecl *FD = dyn_cast<FieldDecl>(d)) {
// If the alignment is less than or equal to 8 bits, the packed attribute
// has no effect.
- if (Context.getTypeAlign(FD->getType()) <= 8)
+ if (!FD->getType()->isIncompleteType() &&
+ Context.getTypeAlign(FD->getType()) <= 8)
Diag(rawAttr->getLoc(),
diag::warn_attribute_ignored_for_field_of_type,
rawAttr->getName()->getName(), FD->getType().getAsString());
extern int g1[sizeof(struct as3) == 16 ? 1 : -1];
extern int g2[__alignof(struct as3) == 8 ? 1 : -1];
+
+
+// rdar://5921025
+struct packedtest {
+ int ted_likes_cheese;
+ void *args[] __attribute__((packed));
+};