summaryrefslogtreecommitdiff
path: root/gcc/testsuite/objc.dg/type-size-4.m
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/objc.dg/type-size-4.m')
-rw-r--r--gcc/testsuite/objc.dg/type-size-4.m23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/objc.dg/type-size-4.m b/gcc/testsuite/objc.dg/type-size-4.m
new file mode 100644
index 000000000..7e26da34a
--- /dev/null
+++ b/gcc/testsuite/objc.dg/type-size-4.m
@@ -0,0 +1,23 @@
+/* Allow ivars that are pointers to structs with an unknown size. */
+/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com> */
+/* PR objc/47832 */
+/* { dg-do compile } */
+
+typedef struct
+{
+ unsigned long int a;
+ double b[];
+} test_type;
+
+@interface Test
+{
+ /* These are all fine. */
+ double *a;
+ struct { int x; double y[]; } *b;
+ test_type *c;
+ union union_type { int x; test_type y; } *d;
+}
+@end
+
+@implementation Test
+@end