1 // Check if ivars may be accessed via the C++ dot notation.
4 // { dg-options "-fno-objc-call-cxx-cdtors" }
6 #include <objc/Object.h>
8 #define CHECK_IF(expr) if(!(expr)) abort()
12 void set_values (int _a, int _b = 3) {
20 @interface Manip : Object {
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];