diff options
author | Dimitris Papavasiliou <dpapavas@gmail.com> | 2015-01-09 17:55:57 +0000 |
---|---|---|
committer | Mike Stump <mrs@gcc.gnu.org> | 2015-01-09 17:55:57 +0000 |
commit | 100bfe4a97e83c70098590e57c4f4f04d98c0837 (patch) | |
tree | f7a3c8630dd13f0857201515e23d52926a7b9a91 /gcc | |
parent | d2286af3d3fe908f84957406aba98eefd1f6e05e (diff) | |
download | gcc-100bfe4a97e83c70098590e57c4f4f04d98c0837.zip gcc-100bfe4a97e83c70098590e57c4f4f04d98c0837.tar.gz gcc-100bfe4a97e83c70098590e57c4f4f04d98c0837.tar.bz2 |
ivars.c: Add a check for classes without instance variables...
2015-01-09 Dimitris Papavasiliou <dpapavas@gmail.com>
* ivars.c: Add a check for classes without instance
variables, which have a NULL ivar list pointer.
2015-01-09 Dimitris Papavasiliou <dpapavas@gmail.com>
* objc.dg/gnu-api-2-class.m: Add a test case
for the above change.
From-SVN: r219396
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/objc.dg/gnu-api-2-class.m | 13 |
2 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a529f19..bdae8ef 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-01-09 Dimitris Papavasiliou <dpapavas@gmail.com> + + * objc.dg/gnu-api-2-class.m: Add a test case + for the above change. + 2015-01-09 Sebastian Huber <sebastian.huber@embedded-brains.de> * gcc.dg/typeof-2.c: Add checks for non-atomic types. diff --git a/gcc/testsuite/objc.dg/gnu-api-2-class.m b/gcc/testsuite/objc.dg/gnu-api-2-class.m index 7f9cf86..34195296 100644 --- a/gcc/testsuite/objc.dg/gnu-api-2-class.m +++ b/gcc/testsuite/objc.dg/gnu-api-2-class.m @@ -239,6 +239,19 @@ int main(int argc, void **args) abort (); } + printf ("Testing class_copyIvarList () on class with no instance variables...\n"); + { + unsigned int count; + Ivar * list = class_copyIvarList (objc_getClass ("MyOtherSubClass"), + &count); + + if (count != 0) + abort (); + + if (list != NULL) + abort (); + } + printf ("Testing class_copyMethodList ()...\n"); { unsigned int count; |