summaryrefslogtreecommitdiff
path: root/gcc/testsuite/obj-c++.dg/property/dotsyntax-22.mm
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/obj-c++.dg/property/dotsyntax-22.mm')
-rw-r--r--gcc/testsuite/obj-c++.dg/property/dotsyntax-22.mm19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/obj-c++.dg/property/dotsyntax-22.mm b/gcc/testsuite/obj-c++.dg/property/dotsyntax-22.mm
new file mode 100644
index 000000000..cc5834822
--- /dev/null
+++ b/gcc/testsuite/obj-c++.dg/property/dotsyntax-22.mm
@@ -0,0 +1,19 @@
+/* PR objc/47784. This testcase used to crash the compiler. */
+
+typedef struct {
+ float x;
+} SomeType;
+
+@interface MyClass
+
+@property(assign,readwrite) SomeType position;
+
+@end
+
+void example (MyClass *x)
+{
+ const SomeType SomeTypeZero = {0.0f};
+
+ x.position= SomeTypeZero;
+}
+