projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a16010a
)
d: Fix pr96435.d failing on SPARC and HPPA
author
Iain Buclaw
<ibuclaw@gdcproject.org>
Sun, 31 Oct 2021 15:49:33 +0000
(16:49 +0100)
committer
Iain Buclaw
<ibuclaw@gdcproject.org>
Sun, 31 Oct 2021 17:33:30 +0000
(18:33 +0100)
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.
gcc/testsuite/gdc.dg/torture/pr96435.d
patch
|
blob
|
history
diff --git
a/gcc/testsuite/gdc.dg/torture/pr96435.d
b/gcc/testsuite/gdc.dg/torture/pr96435.d
index
c6d8785
..
896b25f
100644
(file)
--- 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 = 0x
DEADBEEF
;
+ u.i = 0x
81818181
;
assert(array[u.b] == 678);
return u.b;
}