This is the mail archive of the
mailing list for the GCC project.
Re: PING: gimplifier ICE fix
- From: Richard Henderson <rth at redhat dot com>
- To: Lars Sonchocky-Helldorf <lars dot sonchocky-helldorf at hamburg dot de>
- Cc: gcc-patches at gcc dot gnu dot org, zlaski at apple dot com, discuss-gnustep at gnu dot org
- Date: Mon, 24 Jan 2005 14:51:55 -0800
- Subject: Re: PING: gimplifier ICE fix
- References: <20041212224836.GB12335@redhat.com> <F2969112-6E51-11D9-A437-000393CBC4B6@hamburg.de>
On Mon, Jan 24, 2005 at 10:50:22PM +0100, Lars Sonchocky-Helldorf wrote:
> My proposition is:
> Approve the patch on a timed base, that means approve it for now (so to
> say as a temporary band aid) until the Objective-C rewrite as proposed
> by Ziemowit Laski is done , annotate it with a FIXME comment for that
> Would that - given that this patch doesn't cause trouble anywhere else
> - be o.k. for you?
Firstly because I don't think you have in fact shown that it doesn't
cause trouble anywhere else. Given how fiddly all these bits are, I
think that it would in fact be extremely difficult for you to show this.
The ONLY thing that would be acceptable is some sort of hack in the
objc front end, where any damage is at least localized.
I suspect that only viable fix is to write your own types_compatible_p
hook that doesn't have all of the extra semantics that you want for
comptypes in the front end. This will prevent various cast operations
from being elided during gimplification, which means that all the sanity
checks will come out ok, and the optimizers won't barf on you.
You may in fact be able to get away with using lhd_types_compatible_p,
instead of writing any new code at all for this hook. That would mean
that various bits of intermodule optimization won't work, but given the
other problems I suspect that doesn't work for objc anyway.
You may find that even after the types_compatible_p hook that you're
missing cast operations. There are two ways to attack this. One, fix
the front end as they show up. That may not really be viable, and if
the object model really is to be rewritten for 4.1, not desirable.
Two, write a gimplify_expr hook to *add* new cast operations. You'd
assume that the front end isn't actively wrong in where it wants to
move data around, and mirror some of the logic in check_pointer_types_r
to discover where casts are missing.
If no one can manage to do this (or rewrite the object model) in the
timeframe for 4.0, then I'm sorry but 4.0 will ship with broken objc.