[PATCH] middle-end/94988 fix testcase for big-endian

Richard Biener rguenther@suse.de
Tue May 12 12:12:45 GMT 2020


The testcase only works for little-endian, mark it so.

2020-05-12  Richard Biener  <rguenther@suse.de>

	* gcc.dg/torture/pr94988.c: Disable runtime test for
	* non-little-endian.
---
 gcc/testsuite/gcc.dg/torture/pr94988.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/testsuite/gcc.dg/torture/pr94988.c b/gcc/testsuite/gcc.dg/torture/pr94988.c
index 1ee99fea5ce..dd523b81d99 100644
--- a/gcc/testsuite/gcc.dg/torture/pr94988.c
+++ b/gcc/testsuite/gcc.dg/torture/pr94988.c
@@ -14,7 +14,9 @@ main()
 {
   b = (short *)&b;
   bar (0, 1);
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
   if ((short)(__UINTPTR_TYPE__)b != 0)
     __builtin_abort ();
+#endif
   return 0;
 }
-- 
2.12.3


More information about the Gcc-patches mailing list