summaryrefslogtreecommitdiff
path: root/gcc/testsuite/objc.dg/property/dotsyntax-22.m
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/objc.dg/property/dotsyntax-22.m')
-rw-r--r--gcc/testsuite/objc.dg/property/dotsyntax-22.m19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/objc.dg/property/dotsyntax-22.m b/gcc/testsuite/objc.dg/property/dotsyntax-22.m
new file mode 100644
index 00000000000..cc583482263
--- /dev/null
+++ b/gcc/testsuite/objc.dg/property/dotsyntax-22.m
@@ -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;
+}
+