aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNicola Pero <nicola.pero@meta-innovation.com>2011-08-06 09:49:30 +0000
committerNicola Pero <nicola@gcc.gnu.org>2011-08-06 09:49:30 +0000
commit3f54203792c34fc3381c1bcd4fd77ef62c0c377f (patch)
tree1e7b3a8bb4d030cf3d96c14215b779ba1938243f /gcc
parentcd7c6bc5bfb1304b12d36972f4e2037555fd2d89 (diff)
downloadgcc-3f54203792c34fc3381c1bcd4fd77ef62c0c377f.zip
gcc-3f54203792c34fc3381c1bcd4fd77ef62c0c377f.tar.gz
gcc-3f54203792c34fc3381c1bcd4fd77ef62c0c377f.tar.bz2
In libobjc/: 2011-08-06 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/: 2011-08-06 Nicola Pero <nicola.pero@meta-innovation.com> PR libobjc/49882 * class.c (class_getSuperclass): Return the superclass if the class is in construction. * objc/runtime.h (class_getSuperclass): Updated documentation. In gcc/testsuite/: 2011-08-06 Nicola Pero <nicola.pero@meta-innovation.com> PR libobjc/49882 * objc.dg/gnu-api-2-class.m (main): Test class_getSuperclass() with classes that are in construction. From-SVN: r177505
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/objc.dg/gnu-api-2-class.m8
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index bdfacbf..cb5adfe 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2011-08-06 Nicola Pero <nicola.pero@meta-innovation.com>
+
+ PR libobjc/49882
+ * objc.dg/gnu-api-2-class.m (main): Test class_getSuperclass()
+ with classes that are in construction.
+
2011-08-05 Jason Merrill <jason@redhat.com>
PR c++/48993
diff --git a/gcc/testsuite/objc.dg/gnu-api-2-class.m b/gcc/testsuite/objc.dg/gnu-api-2-class.m
index f396a09..d69f8eb 100644
--- a/gcc/testsuite/objc.dg/gnu-api-2-class.m
+++ b/gcc/testsuite/objc.dg/gnu-api-2-class.m
@@ -394,6 +394,14 @@ int main(int argc, void **args)
MySubClass *object = [[MySubClass alloc] init];
if (class_getSuperclass (object_getClass (object)) != objc_getClass ("MyRootClass"))
abort ();
+
+ /* Test that it works on a newly created, but not registered, class. */
+ {
+ Class new_class = objc_allocateClassPair (objc_getClass ("MyRootClass"), "MySubClass3", 0);
+
+ if (class_getSuperclass (new_class) != objc_getClass ("MyRootClass"))
+ abort ();
+ }
}
printf ("Testing class_getVersion ()...\n");