diff options
Diffstat (limited to 'gcc/testsuite/objc.dg/property/dotsyntax-22.m')
-rw-r--r-- | gcc/testsuite/objc.dg/property/dotsyntax-22.m | 19 |
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 000000000..cc5834822 --- /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; +} + |