public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] d: Fix pr96435.d failing on SPARC and HPPA
@ 2021-10-31 18:53 Iain Buclaw
  0 siblings, 0 replies; only message in thread
From: Iain Buclaw @ 2021-10-31 18:53 UTC (permalink / raw)
  To: gcc-patches

Hi,

This patch fixes test failures seen on SPARC and HPPA targets.  The
value used to initialize the integer field in the union didn't account
for BigEndian targets running this code.

Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, as
well as sparc-sun-solaris2.11.  Committed to mainline.

Regards,
Iain

---
	PR d/102959

gcc/testsuite/ChangeLog:

	* gdc.dg/torture/pr96435.d: Adjust for BigEndian.
---
 gcc/testsuite/gdc.dg/torture/pr96435.d | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gdc.dg/torture/pr96435.d b/gcc/testsuite/gdc.dg/torture/pr96435.d
index c6d8785ec5b..896b25f7cb4 100644
--- a/gcc/testsuite/gdc.dg/torture/pr96435.d
+++ b/gcc/testsuite/gdc.dg/torture/pr96435.d
@@ -6,7 +6,7 @@
     int[2] array = [16, 678];
     union U { int i; bool b; }
     U u;
-    u.i = 0xDEADBEEF;
+    u.i = 0x81818181;
     assert(array[u.b] == 678);
     return u.b;
 }
-- 
2.30.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-31 18:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-31 18:53 [committed] d: Fix pr96435.d failing on SPARC and HPPA Iain Buclaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).