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: gcc-patches at gcc dot gnu dot org
- Cc: Eric Botcazou <ebotcazou at adacore dot com>, Arnaud Charlet <charlet at adacore dot com>
- Date: Thu, 7 Jun 2007 21:36:39 +0200
- Subject: Re: [Ada PATCH] don't modify record fields in update_pointer_to
- References: <200702211356.45659.baldrick@free.fr> <200706071911.21949.baldrick@free.fr> <200706072108.41693.ebotcazou@adacore.com>
Hi Eric,
> > I didn't find gnat_desig_equiv anywhere, and XUT is also built using
> > gnat_desig_type. So I didn't make any changes here.
>
> Hum...
>
> TYPE_OBJECT_RECORD_TYPE (gnu_old) = make_node (RECORD_TYPE);
> TYPE_NAME (TYPE_OBJECT_RECORD_TYPE (gnu_old))
> = concat_id_with_name (get_entity_name (gnat_desig_equiv),
> "XUT");
> TYPE_DUMMY_P (TYPE_OBJECT_RECORD_TYPE (gnu_old)) = 1;
I looked for gnat_desig_equiv on Tuesday - but it only went in on Wednesday
(revision 125370)!
> > The first line is redundant: the field already has this type. Just to be
> > sure I added an assertion that this was true, and then bootstrapped and
> > ran the ACATS and gnat test suites - the assertion never fired. You might
> > also wonder why the second line is not redundant: that's because the array
> > type was modified a few lines above (gnat_substitute_in_type).
>
> OK, a comment would not be superfluous then because that's not trivial.
I will send you a new patch dealing with these issues in a day or two.
Best wishes,
Duncan.