summaryrefslogtreecommitdiff
path: root/gcc/testsuite/objc.dg/gnu-encoding/struct-layout-1_test.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/objc.dg/gnu-encoding/struct-layout-1_test.h')
-rw-r--r--gcc/testsuite/objc.dg/gnu-encoding/struct-layout-1_test.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/objc.dg/gnu-encoding/struct-layout-1_test.h b/gcc/testsuite/objc.dg/gnu-encoding/struct-layout-1_test.h
new file mode 100644
index 000000000..3463bb912
--- /dev/null
+++ b/gcc/testsuite/objc.dg/gnu-encoding/struct-layout-1_test.h
@@ -0,0 +1,9 @@
+#include "struct-layout-1.h"
+
+#define TX(n, type, attrs, fields, ops) \
+type S##n { fields } attrs; \
+void test##n (void) \
+{ \
+ if (objc_sizeof_type (@encoding (type S##n)) != sizeof(type S##n)) \
+ fails ++; \
+}