From 57e274408c237c08d2f78722e3767651ef931170 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 18 Mar 2021 09:53:24 +0100 Subject: [PATCH] testsuite: Fix up pr98099.c testcase for big endian [PR98099] 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 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.dg/pr98099.c b/gcc/testsuite/gcc.dg/pr98099.c index 12e52f2..c78d43e 100644 --- a/gcc/testsuite/gcc.dg/pr98099.c +++ b/gcc/testsuite/gcc.dg/pr98099.c @@ -1,8 +1,9 @@ /* PR middle-end/98099 */ /* Reported by G. Steinmetz */ -/* { 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; }; -- 2.7.4