* lto.c (do_stream_out): Add PART parameter; open dump file.
[official-gcc.git] / gcc / testsuite / obj-c++.dg / try-catch-8.mm
blob7adf2f9e3262ce55504ccea3740571a196f4fa56
1 /* Test for graceful compilation of @synchronized statements.  */
3 /* { dg-do compile } */
4 /* { dg-options "-fobjc-exceptions" } */
6 #include "../objc-obj-c++-shared/TestsuiteObject.h"
8 @interface Derived: TestsuiteObject
9 - (id) meth;
10 @end
12 @implementation Derived
13 - (id) meth {
14   return self;
17 static Derived* rewriteDict(void) {
18   static Derived *sDict = 0;
19   if (sDict == 0) {
20     @synchronized ([Derived class]) {
21       if (sDict == 0)
22         sDict = [Derived new];
23     }
24   } 
25   return sDict;
27 @end