public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-3791] testsuite, Objective-C : Add initialize method to root class.
@ 2020-10-11 14:27 Iain D Sandoe
  0 siblings, 0 replies; only message in thread
From: Iain D Sandoe @ 2020-10-11 14:27 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:40330e70770d1c42ca51f6d84b70b04537687bc5

commit r11-3791-g40330e70770d1c42ca51f6d84b70b04537687bc5
Author: Iain Sandoe <iain@sandoe.co.uk>
Date:   Mon Oct 5 11:38:12 2020 +0100

    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:
---
 gcc/testsuite/objc.dg/ivar-scope-4.m | 6 ++++++
 1 file changed, 6 insertions(+)

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);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-10-11 14:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-11 14:27 [gcc r11-3791] testsuite, Objective-C : Add initialize method to root class Iain D Sandoe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).