summaryrefslogtreecommitdiff
path: root/gcc/testsuite/objc.dg/encode-7.m
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/objc.dg/encode-7.m')
-rw-r--r--gcc/testsuite/objc.dg/encode-7.m18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/objc.dg/encode-7.m b/gcc/testsuite/objc.dg/encode-7.m
new file mode 100644
index 00000000000..0b49a415c29
--- /dev/null
+++ b/gcc/testsuite/objc.dg/encode-7.m
@@ -0,0 +1,18 @@
+/* { dg-options "-fgnu-runtime" } */
+/* { dg-do run } */
+
+#include <objc/encoding.h>
+#include <stdlib.h>
+
+struct f
+{
+ _Bool a;
+};
+
+
+int main(void)
+{
+ if (objc_sizeof_type (@encode (struct f)) != sizeof(struct f))
+ abort ();
+ return 0;
+}