From 5254c66ba0c8f9f45c3054cc41131141ff81330c Mon Sep 17 00:00:00 2001 From: Nicola Pero Date: Wed, 13 Oct 2010 08:16:42 +0000 Subject: In libobjc/: 2010-10-13 Nicola Pero In libobjc/: 2010-10-13 Nicola Pero 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 PR libobjc/23214 * objc.dg/pr23214.m: New. From-SVN: r165414 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/objc.dg/pr23214.m | 27 +++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 gcc/testsuite/objc.dg/pr23214.m (limited to 'gcc') 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 + + PR libobjc/23214 + * objc.dg/pr23214.m: New. + 2010-10-12 Michael Eager 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 +#include + +@protocol A +@end + +@protocol B +@end + +@interface Dummy : Object +@end + +int main () +{ + [@protocol(A) class]; + [@protocol(B) class]; + + return 0; +} + +@implementation Dummy +@end -- cgit v1.1