This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Ada PATCH] don't modify record fields in update_pointer_to
- From: Duncan Sands <baldrick at free dot fr>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Arnaud Charlet <charlet at adacore dot com>
- Date: Wed, 21 Feb 2007 18:20:31 +0100
- Subject: Re: [Ada PATCH] don't modify record fields in update_pointer_to
- References: <200702211356.45659.baldrick@free.fr> <200702211814.37450.ebotcazou@adacore.com>
Hi Eric,
> > You can get away with this in mainline gcc, because it simply doesn't
> > notice, however this instantly caused trouble in my port of the Ada f-e to
> > LLVM. This patch changes update_pointer_to so as to not replace fields:
> > instead it uses update_pointer_to (simple pointer case) to update the
> > pointer types used in the fields. For this to work, the dummy fat pointer
> > fields are changed from being void pointers into pointers to dummy nodes.
>
> Last time I tried to do something like that, the hell breaks loose with the
> PLACEHOLDER_EXPR machinery. But your attempt looks more clever because it is
> piggybacked on dummy nodes.
as I mentioned, it passes all the tests I have available. But I'm sure you
have many more tests! Any chance of sending me some appropriate ones?
> Unfortunately the FSF mainline code is somewhat outdated wrt to dummy nodes
> and fat-pointer types, so I'm not sure your patch will still work once they
> are again synchronized with that of AdaCore.
I'll hold onto it until the trees are back in sync then, and rework it once that
happens.
Best wishes,
Duncan.