diff options
author | Nicola Pero <nicola.pero@meta-innovation.com> | 2010-10-13 08:16:42 +0000 |
---|---|---|
committer | Nicola Pero <nicola@gcc.gnu.org> | 2010-10-13 08:16:42 +0000 |
commit | 5254c66ba0c8f9f45c3054cc41131141ff81330c (patch) | |
tree | 90a905402a30b7ee4f28d659a1e3f13ab50b2d19 /gcc | |
parent | b4ca4f9e328cbce0f3aa9b13931900b2e5bd752e (diff) | |
download | gcc-5254c66ba0c8f9f45c3054cc41131141ff81330c.zip gcc-5254c66ba0c8f9f45c3054cc41131141ff81330c.tar.gz gcc-5254c66ba0c8f9f45c3054cc41131141ff81330c.tar.bz2 |
In libobjc/: 2010-10-13 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-10-13 Nicola Pero <nicola.pero@meta-innovation.com>
PR libobjc/23214
* init.c (objc_init_statics): Do not skip the initialization of a
statics list if the first object has already been initialized; in
the case of Protocols, while the first one may have been
initialized, some others may not have been initialized yet.
In gcc/testsuite/:
2010-10-13 Nicola Pero <nicola.pero@meta-innovation.com>
PR libobjc/23214
* objc.dg/pr23214.m: New.
From-SVN: r165414
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/objc.dg/pr23214.m | 27 |
2 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 72f281c..0c0803e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-10-13 Nicola Pero <nicola.pero@meta-innovation.com> + + PR libobjc/23214 + * objc.dg/pr23214.m: New. + 2010-10-12 Michael Eager <eager@eagercon.com> PR testsuite/45856 diff --git a/gcc/testsuite/objc.dg/pr23214.m b/gcc/testsuite/objc.dg/pr23214.m new file mode 100644 index 0000000..946dbeb --- /dev/null +++ b/gcc/testsuite/objc.dg/pr23214.m @@ -0,0 +1,27 @@ +/* Test that there is no problem initializing multiple static + Protocol instances. */ + +/* { dg-do run } */ + +#include <objc/Object.h> +#include <objc/Protocol.h> + +@protocol A +@end + +@protocol B +@end + +@interface Dummy : Object <B> +@end + +int main () +{ + [@protocol(A) class]; + [@protocol(B) class]; + + return 0; +} + +@implementation Dummy +@end |