* lto.c (do_stream_out): Add PART parameter; open dump file.
[official-gcc.git] / gcc / testsuite / obj-c++.dg / try-catch-15.mm
blob01b3d5cbfb4c97719eb2da6e87fdb2683664c583
1 /* Test if addition of 'volatile' to object causes bogus error in presence of try-catch. */
2 /* { dg-options "-fobjc-exceptions" } */
3 /* { dg-do compile } */
5 @interface Exception
6 @end
8 class CppObj {
9 public:
10     void constMethod() const {
11     }
14 @interface MyObject : Exception
15 - (void)doSomething;
16 - (void)myMethod;
17 @end
19 @implementation MyObject
20 - (void)doSomething {
23 - (void)myMethod {
24     CppObj cppObj;
25     
26     @try {
27         [self doSomething];
28     }
29     @catch (Exception *exception) {
30     }
31     
32     cppObj.constMethod();
34 @end