[committed] Re: Bug in DEC UNION/STRUCT patch

Fritz Reese fritzoreese@gmail.com
Tue Aug 23 16:14:00 GMT 2016


On Mon, Aug 22, 2016 at 5:22 PM, Steve Kargl
<sgk@troutmask.apl.washington.edu> wrote:
> Fritz,
>
> I was lookng at part of a previous patch that I committed for you.
> In interface.c, one now has
>
> static int
> compare_components (gfc_component *cmp1, gfc_component *cmp2,
>     gfc_symbol *derived1, gfc_symbol *derived2)
> {
>   gfc_symbol *d1, *d2;
>   bool anonymous = false;
>
>   /* Unions, maps, and anonymous structures all have names like "[xX]X$\d+"
>      which should not be compared.  */
>   d1 = cmp1->ts.u.derived;
>   d2 = cmp2->ts.u.derived;
>   if (   (d1 && (d1->attr.flavor == FL_STRUCT || d1->attr.flavor == FL_UNION)
>           && ISUPPER (cmp1->name[1]))
>       || (d2 && (d2->attr.flavor == FL_STRUCT || d2->attr.flavor == FL_UNION)
>           && ISUPPER (cmp1->name[1])))
>     anonymous = true;
>
> Is the second ISUPPER suppose to have cmp2->name[1]?
>
> --
> Steve

This above is pretty clearly a typo. The attached patch committed as
obvious r239706.

---
Fritz Reese


2016-08-23  Fritz Reese  <fritzoreese@gmail.com>

        gcc/fortran/
        * interface.c (compare_components): Fix typo in name check conditional.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compare_components_typo.patch
Type: text/x-patch
Size: 596 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160823/d8a885b7/attachment.bin>


More information about the Gcc-patches mailing list