public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Harald Anlauf <anlauf@gmx.de>
To: Rimvydas Jasinskas <rimvydasjas@gmail.com>
Cc: fortran <fortran@gcc.gnu.org>, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: Support for NOINLINE attribute
Date: Mon, 13 Feb 2023 18:50:23 +0100	[thread overview]
Message-ID: <0115618b-059b-fd11-a813-33374f16af78@gmx.de> (raw)
In-Reply-To: <trinity-243da616-30f8-47b4-8a75-cdc8fb452b5f-1676237302470@3c-app-gmx-bap35>

Pushed as:

commit 086a1df4374962787db37c1f0d1bd9beb828f9e3

Thanks,
Harald

On 2/12/23 22:28, Harald Anlauf via Gcc-patches wrote:
> Hi Rimvydas,
>
>> Gesendet: Sonntag, 12. Februar 2023 um 07:59 Uhr
>> Von: "Rimvydas Jasinskas" <rimvydasjas@gmail.com>
>> An: "Harald Anlauf" <anlauf@gmx.de>
>> Cc: "fortran" <fortran@gcc.gnu.org>
>> Betreff: Re: Support for NOINLINE attribute
>>
>> On Sat, Feb 11, 2023 at 11:26 PM Harald Anlauf <anlauf@gmx.de> wrote:
>>> I am also not a native speaker, like many others contributing, but let
>>> me quote the relevant orignal paragraph:
>>>
>>> "The @code{noreturn} keyword tells the compiler to assume that
>>> @code{fatal} cannot return.  It can then optimize without regard to what
>>> would happen if @code{fatal} ever did return.  This makes slightly
>>> better code.  More importantly, it helps avoid spurious warnings of
>>> uninitialized variables."
>>>
>>> My reading of this original paragraph differs very much from the
>>> intention I get from the shortened version.  Would you please reread?
>>>
>>>> Same, from extend.texi, see gcc/testsuite/gfortran.dg/noreturn-3.f90
>>>> It is about marking dead conditional branches, so that the compiler
>>>> can prove proper initialization (no -Wmaybe-uninitialized given).  It
>>>> should behave the same as in C frontend.
>>>
>>> True.  And that's the whole point (IMHO), not silencing the compiler.
>> Hmm both look the same to me, the silencing of false positive
>> diagnostics is already implied by spurious.  To simplify I have
>> changed it in v2 to just:
>> "add a hint that a given function cannot return" documentation could
>> be expanded later.
>>
>>> But shouldn't we rather follow what the C family of compilers in the
>>> first place does for a particular target?  Most relevant libraries
>>> for Fortran code are either C/C++ or Fortran anyway, including any
>>> of the common MPI implementations, so should we care about Ada?
>> I agree with you.  I have removed SUPPORTS_WEAK check and fixed
>> indentation in v2.
>>
>> Regtested cleany on x86_64-pc-linux-gnu.
>>
>> Regards,
>> Rimvydas
>
> this version of the patch looks good to me, so it is basically OK
> to commit.
>
> There is one thing I cannot test, which is the handling of weak symbols
> on other platforms.  A quick glance at the C testcases suggests that
> someone with access to either an NVPTX or MingGW target might tell
> whether that particular target should be excluded.  So I'd like to wait
> for 24 hours for others to comment on this.
>
> I see that you've signed-off your patch.  Do you have commit rights?
> Otherwise I'll commit for you.  (I've CC'ed to gcc-patches@ for this
> purpose.)
>
> Thanks for the patch!
>
> Harald
>
>
>


WARNING: multiple messages have this Message-ID
From: Harald Anlauf <anlauf@gmx.de>
To: gcc-patches@gcc.gnu.org
Cc: fortran@gcc.gnu.org
Subject: Re: Support for NOINLINE attribute
Date: Mon, 13 Feb 2023 18:50:23 +0100	[thread overview]
Message-ID: <0115618b-059b-fd11-a813-33374f16af78@gmx.de> (raw)
Message-ID: <20230213175023.I4A0vIFxFPVD-I5myKzXK1kg_2yiRGLQgbiwXxv8h4g@z> (raw)
In-Reply-To: <trinity-243da616-30f8-47b4-8a75-cdc8fb452b5f-1676237302470@3c-app-gmx-bap35>

Pushed as:

commit 086a1df4374962787db37c1f0d1bd9beb828f9e3

Thanks,
Harald

On 2/12/23 22:28, Harald Anlauf via Gcc-patches wrote:
> Hi Rimvydas,
> 
>> Gesendet: Sonntag, 12. Februar 2023 um 07:59 Uhr
>> Von: "Rimvydas Jasinskas" <rimvydasjas@gmail.com>
>> An: "Harald Anlauf" <anlauf@gmx.de>
>> Cc: "fortran" <fortran@gcc.gnu.org>
>> Betreff: Re: Support for NOINLINE attribute
>>
>> On Sat, Feb 11, 2023 at 11:26 PM Harald Anlauf <anlauf@gmx.de> wrote:
>>> I am also not a native speaker, like many others contributing, but let
>>> me quote the relevant orignal paragraph:
>>>
>>> "The @code{noreturn} keyword tells the compiler to assume that
>>> @code{fatal} cannot return.  It can then optimize without regard to what
>>> would happen if @code{fatal} ever did return.  This makes slightly
>>> better code.  More importantly, it helps avoid spurious warnings of
>>> uninitialized variables."
>>>
>>> My reading of this original paragraph differs very much from the
>>> intention I get from the shortened version.  Would you please reread?
>>>
>>>> Same, from extend.texi, see gcc/testsuite/gfortran.dg/noreturn-3.f90
>>>> It is about marking dead conditional branches, so that the compiler
>>>> can prove proper initialization (no -Wmaybe-uninitialized given).  It
>>>> should behave the same as in C frontend.
>>>
>>> True.  And that's the whole point (IMHO), not silencing the compiler.
>> Hmm both look the same to me, the silencing of false positive
>> diagnostics is already implied by spurious.  To simplify I have
>> changed it in v2 to just:
>> "add a hint that a given function cannot return" documentation could
>> be expanded later.
>>
>>> But shouldn't we rather follow what the C family of compilers in the
>>> first place does for a particular target?  Most relevant libraries
>>> for Fortran code are either C/C++ or Fortran anyway, including any
>>> of the common MPI implementations, so should we care about Ada?
>> I agree with you.  I have removed SUPPORTS_WEAK check and fixed
>> indentation in v2.
>>
>> Regtested cleany on x86_64-pc-linux-gnu.
>>
>> Regards,
>> Rimvydas
> 
> this version of the patch looks good to me, so it is basically OK
> to commit.
> 
> There is one thing I cannot test, which is the handling of weak symbols
> on other platforms.  A quick glance at the C testcases suggests that
> someone with access to either an NVPTX or MingGW target might tell
> whether that particular target should be excluded.  So I'd like to wait
> for 24 hours for others to comment on this.
> 
> I see that you've signed-off your patch.  Do you have commit rights?
> Otherwise I'll commit for you.  (I've CC'ed to gcc-patches@ for this
> purpose.)
> 
> Thanks for the patch!
> 
> Harald
> 
> 
> 



  reply	other threads:[~2023-02-13 17:50 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         ` Harald Anlauf
2023-02-13 17:50           ` Harald Anlauf [this message]
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
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=0115618b-059b-fd11-a813-33374f16af78@gmx.de \
    --to=anlauf@gmx.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rimvydasjas@gmail.com \
    /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).