diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2020-10-05 11:38:12 +0100 |
---|---|---|
committer | Iain Sandoe <iain@sandoe.co.uk> | 2020-10-11 15:18:02 +0100 |
commit | 40330e70770d1c42ca51f6d84b70b04537687bc5 (patch) | |
tree | 7c06e0156daa69a3c69f2ff8d6321c8cc4b853d0 | |
parent | bae828f7bbf49709df96cb264aae2c38a0cca807 (diff) | |
download | gcc-40330e70770d1c42ca51f6d84b70b04537687bc5.zip gcc-40330e70770d1c42ca51f6d84b70b04537687bc5.tar.gz gcc-40330e70770d1c42ca51f6d84b70b04537687bc5.tar.bz2 |
testsuite, Objective-C : Add initialize method to root class.
Older versions of the runtime don't like it when the root class
has a missing initialize method. They try to forward to an non-
existent super class resulting in a crash.
TODO: maybe we can diagnose this.
gcc/testsuite/ChangeLog:
* objc.dg/ivar-scope-4.m: Add inititialize method to the
root class.
-rw-r--r-- | gcc/testsuite/objc.dg/ivar-scope-4.m | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/testsuite/objc.dg/ivar-scope-4.m b/gcc/testsuite/objc.dg/ivar-scope-4.m index f720972..5fc29f9 100644 --- a/gcc/testsuite/objc.dg/ivar-scope-4.m +++ b/gcc/testsuite/objc.dg/ivar-scope-4.m @@ -18,6 +18,7 @@ int someivar = 1; int someivar; } ++ (id) initialize; + (id) alloc; - (id) init; - (int) getGlobal; @@ -26,6 +27,11 @@ int someivar = 1; @end @implementation MyClass ++ (id) initialize +{ + return self; +} + + (id) alloc { return class_createInstance (self, 0); |