diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2021-10-31 16:49:33 +0100 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2021-10-31 18:33:30 +0100 |
commit | 1b5f73858412731bb2e821bdf0fc85d6cc012d33 (patch) | |
tree | aa0d406450a9c374256f40ad949a614cf8529194 | |
parent | a16010a3eed9d5a3e49098351cf5ba18483cdc02 (diff) | |
download | gcc-1b5f73858412731bb2e821bdf0fc85d6cc012d33.zip gcc-1b5f73858412731bb2e821bdf0fc85d6cc012d33.tar.gz gcc-1b5f73858412731bb2e821bdf0fc85d6cc012d33.tar.bz2 |
d: Fix pr96435.d failing on SPARC and HPPA
The value used to initialize the integer field in the union didn't
account for BigEndian targets running this code.
PR d/102959
gcc/testsuite/ChangeLog:
* gdc.dg/torture/pr96435.d: Adjust for BigEndian.
-rw-r--r-- | gcc/testsuite/gdc.dg/torture/pr96435.d | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/testsuite/gdc.dg/torture/pr96435.d b/gcc/testsuite/gdc.dg/torture/pr96435.d index c6d8785..896b25f 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; } |