https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123353
--- Comment #3 from Rainer Orth <ro at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> Yeah. Mine, unless you beat me to a fix (I'll comment out all checking if
> not little-endian).
While that works, of course (probably with comment referencing the PR)
diff --git a/gcc/testsuite/gcc.dg/torture/builtin-shufflevector-pr123156.c
b/gcc/testsuite/gcc.dg/torture/builtin-shufflevector-pr123156.c
--- a/gcc/testsuite/gcc.dg/torture/builtin-shufflevector-pr123156.c
+++ b/gcc/testsuite/gcc.dg/torture/builtin-shufflevector-pr123156.c
@@ -34,7 +34,9 @@ uint64_t func_1()
int main()
{
uint64_t BS_CHECKSUM = func_1();
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
if (BS_CHECKSUM != 0x0000000000000200ull)
__builtin_abort ();
+#endif
return 0;
}
it has one disadvantage: the test seems to PASS although it's a no-op actually.
We have ample precendent for this, of course: all x86 tests that check at
runtime whether an ISA extension is supported by the current CPU do this.
However, it might be better to require target le to turn the test unsupported
in this case.