summaryrefslogtreecommitdiff
path: root/gcc/testsuite/objc.dg/encode-9.m
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/objc.dg/encode-9.m')
-rw-r--r--gcc/testsuite/objc.dg/encode-9.m12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/objc.dg/encode-9.m b/gcc/testsuite/objc.dg/encode-9.m
new file mode 100644
index 000000000..1ff2a6b0e
--- /dev/null
+++ b/gcc/testsuite/objc.dg/encode-9.m
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+
+/* There was an ICE due to diving by zero in the objc front-end. */
+
+struct f
+{
+ int i;
+ struct{} g[4];
+ int tt;
+};
+
+char *e = @encode(struct f);