public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Xi Ruoyao <xry111@xry111.site>
Cc: gcc-patches@gcc.gnu.org, Richard Biener <rguenther@suse.de>
Subject: Re: [PATCH] testsuite: Use noipa and noinline attributes for pr95115 test
Date: Fri, 27 Jan 2023 12:50:13 +0100	[thread overview]
Message-ID: <Y9O6dbywgKS2c1kK@tucnak> (raw)
In-Reply-To: <20230127114627.243812-1-xry111@xry111.site>

On Fri, Jan 27, 2023 at 07:46:27PM +0800, Xi Ruoyao wrote:
> They prevent the compiler from deeming the NaN result "unused" and
> remove the calculation raising INVALID exception. See the discussion
> in PR107608 for details.
> 
> Tested on x86_64-linux-gnu where the change fixes the test failure.
> Ok for trunk?
> 
> gcc/testsuite/ChangeLog:
> 
> 	* gcc.dg/pr95115.c (x): Add noipa and noinline attributes.

noipa implies noinline, so unless one targets both very old gcc versions
which didn't have noipa attribute in addition to current ones, it is
sufficient to specify just noipa.

Otherwise LGTM.

> diff --git a/gcc/testsuite/gcc.dg/pr95115.c b/gcc/testsuite/gcc.dg/pr95115.c
> index 69c4f83250c..11620acccae 100644
> --- a/gcc/testsuite/gcc.dg/pr95115.c
> +++ b/gcc/testsuite/gcc.dg/pr95115.c
> @@ -6,7 +6,7 @@
>  #include <fenv.h>
>  #include <stdlib.h>
>  
> -double
> +__attribute__ ((noipa, noinline)) double
>  x (void)
>  {
>    double d = __builtin_inf ();
> -- 
> 2.39.1

	Jakub


  reply	other threads:[~2023-01-27 11:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-27 11:46 Xi Ruoyao
2023-01-27 11:50 ` Jakub Jelinek [this message]
2023-01-27 12:08   ` Pushed: [PATCH] testsuite: Use noipa attribute " Xi Ruoyao
2023-01-27 12:14     ` Jakub Jelinek

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=Y9O6dbywgKS2c1kK@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    --cc=xry111@xry111.site \
    /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).