testsuite: Fix up pr98099.c testcase for big endian [PR98099]
authorJakub Jelinek <jakub@redhat.com>
Thu, 18 Mar 2021 08:53:24 +0000 (09:53 +0100)
committerJakub Jelinek <jakub@redhat.com>
Thu, 18 Mar 2021 08:53:24 +0000 (09:53 +0100)
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.

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

index 12e52f2..c78d43e 100644 (file)
@@ -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; };