public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Eric Botcazou <botcazou@adacore.com>
Cc: gcc-patches@gcc.gnu.org
Subject: [committed] testsuite: Fix up pr98099.c testcase for big endian [PR98099]
Date: Thu, 18 Mar 2021 09:57:32 +0100	[thread overview]
Message-ID: <20210318085731.GQ231854@tucnak> (raw)
In-Reply-To: <11167197.LmN1t0yOBY@fomalhaut>

On Thu, Dec 03, 2020 at 11:47:26AM +0100, Eric Botcazou wrote:
> 2020-12-03  Eric Botcazou  <ebotcazou@adacore.com>
> 
> 	* gcc.dg/pr98099.c: New test.

The testcase fails on big-endian without int128 support, because
due to -fsso-struct=big-endian no swapping is needed for big endian.
This patch restricts the testcase to big or little endian (but not pdp)
and uses -fsso-struct=little-endian for big endian, so that it is
swapping everywhere.

Regtested on x86_64-linux, i686-linux and cross tested on powerpc64-linux
-m32/-m64, acked by Eric in the PR, committed to trunk.

2021-03-18  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/98099
	* gcc.dg/pr98099.c: Don't compile the test on pdp endian.
	For big endian use -fsso-struct=little-endian dg-options.

--- gcc/testsuite/gcc.dg/pr98099.c.jj	2020-12-04 10:53:56.306043973 +0100
+++ gcc/testsuite/gcc.dg/pr98099.c	2021-03-17 20:05:07.714417723 +0100
@@ -1,8 +1,9 @@
 /* PR middle-end/98099 */
 /* Reported by G. Steinmetz <gscfq@t-online.de> */
 
-/* { dg-do compile { target dfp } } */
-/* { dg-options "-fsso-struct=big-endian" } */
+/* { dg-do compile { target { dfp && { be || le } } } } */
+/* { dg-options "-fsso-struct=big-endian" { target le } } */
+/* { dg-options "-fsso-struct=little-endian" { target be } } */
 
 struct S { _Decimal128 a; };
 


	Jakub


      parent reply	other threads:[~2021-03-19 10:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-03 10:47 [patch] Fix PR middle-end/98099 Eric Botcazou
2020-12-03 12:33 ` Richard Biener
2020-12-04  9:22   ` Christophe Lyon
2020-12-04  9:29     ` Eric Botcazou
2021-03-18  8:57 ` Jakub Jelinek [this message]

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=20210318085731.GQ231854@tucnak \
    --to=jakub@redhat.com \
    --cc=botcazou@adacore.com \
    --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).