From: Iain Sandoe Date: Mon, 5 Oct 2020 10:38:12 +0000 (+0100) Subject: testsuite, Objective-C : Add initialize method to root class. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=40330e70770d1c42ca51f6d84b70b04537687bc5;p=gcc.git 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. --- diff --git a/gcc/testsuite/objc.dg/ivar-scope-4.m b/gcc/testsuite/objc.dg/ivar-scope-4.m index f7209724be9..5fc29f90bdc 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);