public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Harald Anlauf <anlauf@gmx.de>
To: gcc-patches@gcc.gnu.org
Cc: fortran@gcc.gnu.org
Subject: Re: Support for WEAK attribute, part 2
Date: Fri, 24 Feb 2023 23:03:42 +0100	[thread overview]
Message-ID: <48dcf6fc-9a16-84b1-1963-afdbacfbb57e@gmx.de> (raw)
In-Reply-To: <CAFmAMQ09NyRUrYOuLdY25spnkmd-1E2bnPLprop8p36BTHb-Qg@mail.gmail.com>

Hi Rimvydas,

Am 24.02.23 um 06:16 schrieb Rimvydas Jasinskas via Gcc-patches:
> On Thu, Feb 23, 2023 at 10:53 PM Harald Anlauf <anlauf@gmx.de> wrote:
>> the patch is mostly fine, but there is a minor style issue:
>>
>> +      if (sym->attr.ext_attr & (1 << EXT_ATTR_WEAK))
>> +       gfc_error ("Symbol %qs at %L has the WEAK attribute but is a %s",
>> +                  sym->name, &sym->declared_at, sym->attr.dummy
>> +                  ? "dummy argument" : "local variable");
>> +
>>
>> It is my understanding that this is not translation-friendly.
>> Please use separate error texts for either case instead.
> Interesting, I was under the impression this was fixed with OO-inlines
> around the *.c rename.

if this is the case, I must have missed it.

 > In any case, adjusted in v2 to use:
> +      if (sym->attr.ext_attr & (1 << EXT_ATTR_WEAK))
> +    {
> +      if (sym->attr.dummy)
> +        gfc_error ("Symbol %qs at %L has the WEAK attribute but is a "
> +               "dummy argument", sym->name, &sym->declared_at);
> +      else
> +        gfc_error ("Symbol %qs at %L has the WEAK attribute but is a "
> +               "local variable", sym->name, &sym->declared_at);
> +    }

This is ok.

> These testcases are dg-compile and do not go through the "-O0 -O1 -O2
> -O3 -Os" options like dg-run.  Combining the testcases does not reduce
> gfortran.sum a lot:

I wasn't thinking of gfortran.sum, it's about the total overhead of
the testsuite (dejagnu etc.).  But thanks for combining the tests!

>> Finally, please do not forget to CC patches to gcc-patches@
>> so that others can see them.
> Out of curiosity, what is the purpose of CC patches to gcc-patches
> too?  Attachments are even available in web mailing list too, like in:
> https://gcc.gnu.org/pipermail/fortran/2023-February/058953.html

Well, patches should always go the gcc-patches@, see e.g.

https://gcc.gnu.org/gitwrite.html

On the other hand, many *Fortran* reviewers will ignore patches
there and look at them only when they are sent to fortran@.

Thanks for your patch, pushed as r13-6338-gbcbeebc498126c .

Harald

> Regards,
> Rimvydas



WARNING: multiple messages have this Message-ID
From: Harald Anlauf <anlauf@gmx.de>
To: Rimvydas Jasinskas <rimvydasjas@gmail.com>
Cc: Rimvydas Jasinskas via Fortran <fortran@gcc.gnu.org>,
	gcc-patches@gnu.org
Subject: Re: Support for WEAK attribute, part 2
Date: Fri, 24 Feb 2023 23:03:42 +0100	[thread overview]
Message-ID: <48dcf6fc-9a16-84b1-1963-afdbacfbb57e@gmx.de> (raw)
Message-ID: <20230224220342.NwmktBmVzNZiYoqkMA4X_1WwbTusmc3Y4EnI0gORxDI@z> (raw)
In-Reply-To: <CAFmAMQ09NyRUrYOuLdY25spnkmd-1E2bnPLprop8p36BTHb-Qg@mail.gmail.com>

Hi Rimvydas,

Am 24.02.23 um 06:16 schrieb Rimvydas Jasinskas via Gcc-patches:
> On Thu, Feb 23, 2023 at 10:53 PM Harald Anlauf <anlauf@gmx.de> wrote:
>> the patch is mostly fine, but there is a minor style issue:
>>
>> +      if (sym->attr.ext_attr & (1 << EXT_ATTR_WEAK))
>> +       gfc_error ("Symbol %qs at %L has the WEAK attribute but is a %s",
>> +                  sym->name, &sym->declared_at, sym->attr.dummy
>> +                  ? "dummy argument" : "local variable");
>> +
>>
>> It is my understanding that this is not translation-friendly.
>> Please use separate error texts for either case instead.
> Interesting, I was under the impression this was fixed with OO-inlines
> around the *.c rename.

if this is the case, I must have missed it.

 > In any case, adjusted in v2 to use:
> +      if (sym->attr.ext_attr & (1 << EXT_ATTR_WEAK))
> +    {
> +      if (sym->attr.dummy)
> +        gfc_error ("Symbol %qs at %L has the WEAK attribute but is a "
> +               "dummy argument", sym->name, &sym->declared_at);
> +      else
> +        gfc_error ("Symbol %qs at %L has the WEAK attribute but is a "
> +               "local variable", sym->name, &sym->declared_at);
> +    }

This is ok.

> These testcases are dg-compile and do not go through the "-O0 -O1 -O2
> -O3 -Os" options like dg-run.  Combining the testcases does not reduce
> gfortran.sum a lot:

I wasn't thinking of gfortran.sum, it's about the total overhead of
the testsuite (dejagnu etc.).  But thanks for combining the tests!

>> Finally, please do not forget to CC patches to gcc-patches@
>> so that others can see them.
> Out of curiosity, what is the purpose of CC patches to gcc-patches
> too?  Attachments are even available in web mailing list too, like in:
> https://gcc.gnu.org/pipermail/fortran/2023-February/058953.html

Well, patches should always go the gcc-patches@, see e.g.

https://gcc.gnu.org/gitwrite.html

On the other hand, many *Fortran* reviewers will ignore patches
there and look at them only when they are sent to fortran@.

Thanks for your patch, pushed as r13-6338-gbcbeebc498126c .

Harald

> Regards,
> Rimvydas


  reply	other threads:[~2023-02-24 22:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAFmAMQ1KXtMfR=jPjKpBQfBp=RxFWNWZ23EhjMe=C8GjUBZBwA@mail.gmail.com>
     [not found] ` <trinity-4b3fd457-1be1-4c15-b277-628cc43074b2-1676063244052@3c-app-gmx-bs43>
     [not found]   ` <CAFmAMQ08t9rKAC9w_x+Z2Dj=LJUok8DT2B02qR3U6hvtnpk7Ug@mail.gmail.com>
     [not found]     ` <trinity-d9f0601c-cc39-43be-bae7-2b985656599c-1676150813891@3c-app-gmx-bap36>
     [not found]       ` <CAFmAMQ2+f-JsDrXGw0y+nJCTHk=D2+k1PM9kSLz=7JiNeUwEoQ@mail.gmail.com>
2023-02-12 21:28         ` Support for NOINLINE attribute Harald Anlauf
2023-02-13 17:50           ` Harald Anlauf
2023-02-13 17:50             ` Harald Anlauf
2023-02-14  9:35             ` nvptx: Adjust 'scan-assembler' in 'gfortran.dg/weak-1.f90' (was: Support for NOINLINE attribute) Thomas Schwinge
2023-02-14 19:55               ` Harald Anlauf
2023-02-14 19:55                 ` Harald Anlauf
     [not found]                 ` <CAFmAMQ04TtgTu1oZnzFSWw9pkgK0tRmt8ptpx1Xz4K0gjDCaag@mail.gmail.com>
     [not found]                   ` <trinity-bb49b3d4-7455-4c7b-89d9-a9a857e68651-1676584221172@3c-app-gmx-bs44>
     [not found]                     ` <CAFmAMQ0bzmO1bmCy_5men10qmmv2K9G6jRgSk6XnY+HW-VVtLA@mail.gmail.com>
     [not found]                       ` <trinity-475912d3-f7e9-4ec9-b5c7-66d0cad9e63e-1677185631233@3c-app-gmx-bap67>
2023-02-24  5:16                         ` Support for WEAK attribute, part 2 Rimvydas Jasinskas
2023-02-24 22:03                           ` Harald Anlauf [this message]
2023-02-24 22:03                             ` Harald Anlauf
2023-03-28 21:06                           ` Enable 'gfortran.dg/weak-2.f90' for nvptx target (was: Support for WEAK attribute, part 2) Thomas Schwinge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48dcf6fc-9a16-84b1-1963-afdbacfbb57e@gmx.de \
    --to=anlauf@gmx.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).