1 // Check if ivars may be accessed via the C++ dot notation.
3 // { dg-options "-fno-objc-call-cxx-cdtors" }
4 // { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } }
6 #include "../objc-obj-c++-shared/TestsuiteObject.m"
8 #define CHECK_IF(expr) if(!(expr)) abort()
12 void set_values (int _a, int _b = 3) {
20 @interface Manip : TestsuiteObject {
22 cxx_struct s; // { dg-warning "user-defined destructor" }
23 // { dg-warning "constructors and destructors will not be invoked" "" { target *-*-* } 22 }
25 - (void) manipulate_ivars;
29 - (void) manipulate_ivars {
31 CHECK_IF (s.a == 7 && s.b == 3);
33 CHECK_IF (s.a == 99 && s.b == 99);
39 Manip *obj = [Manip new];
40 [obj manipulate_ivars];