On Thu, Dec 03, 2020 at 11:47:26AM +0100, Eric Botcazou wrote:
> 2020-12-03  Eric Botcazou  <ebotca...@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  <ja...@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 <gs...@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

Reply via email to