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: Eric Botcazou <ebotcazou at adacore dot com>
- To: Duncan Sands <baldrick at free dot fr>
- Cc: gcc-patches at gcc dot gnu dot org, Arnaud Charlet <charlet at adacore dot com>
- Date: Thu, 7 Jun 2007 21:08:41 +0200
- Subject: Re: [Ada PATCH] don't modify record fields in update_pointer_to
- References: <200702211356.45659.baldrick@free.fr> <200706041547.21879.ebotcazou@adacore.com> <200706071911.21949.baldrick@free.fr>
> I've redone the patch (attached) based on the tree as of today. It
> bootstraps and does not introduce any new failures in the testsuite.
Great!
> 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;
> 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.
--
Eric Botcazou