From 4a475b3fbbf21bc7facaacb11051a832a5085733 Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Wed, 24 Apr 2019 09:15:59 +0000 Subject: [PATCH] d/dmd: Merge upstream dmd 423758078 Fixes another failing test to pass on BigEndian. Initial patch by Robin Dapp. Reviewed-on: https://github.com/dlang/dmd/pull/9684 gcc/testsuite/ChangeLog: 2019-04-24 Iain Buclaw * gdc.test/README.gcc: New file. From-SVN: r270536 --- gcc/d/dmd/MERGE | 2 +- gcc/testsuite/ChangeLog | 4 +++ gcc/testsuite/gdc.test/README.gcc | 14 ++++++++++ gcc/testsuite/gdc.test/runnable/test42.d | 35 +++++++++++++++++------- 4 files changed, 44 insertions(+), 11 deletions(-) create mode 100644 gcc/testsuite/gdc.test/README.gcc diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE index 7424576512b..b81cfc64d70 100644 --- a/gcc/d/dmd/MERGE +++ b/gcc/d/dmd/MERGE @@ -1,4 +1,4 @@ -3b3dca8be201b443f17621cd29cf614007b5c75e +423758078f8fcd945815a5294806915a8a01d392 The first line of this file holds the git revision number of the last merge done from the dlang/dmd repository. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 73b34e07113..19972ed55c3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2019-04-24 Iain Buclaw + + * gdc.test/README.gcc: New file. + 2019-04-24 Jakub Jelinek PR tree-optimization/90208 diff --git a/gcc/testsuite/gdc.test/README.gcc b/gcc/testsuite/gdc.test/README.gcc new file mode 100644 index 00000000000..984da5e3a57 --- /dev/null +++ b/gcc/testsuite/gdc.test/README.gcc @@ -0,0 +1,14 @@ +The files in this subdirectory where noted are part of the D2 +programming language test suite for the Digitial Mars D compiler, +hosted at https://github.com/dlang/dmd/. + +The current git revision number of these tests is maintained in +gcc/d/dmd/MERGE. + +The following directories are part of DMD: + compilable/ + fail_compilation/ + runnable/ + +All changes to dmd should go through the upstream repository first, +then merged back to GCC. diff --git a/gcc/testsuite/gdc.test/runnable/test42.d b/gcc/testsuite/gdc.test/runnable/test42.d index 87ee7a8e73a..76f8e212358 100644 --- a/gcc/testsuite/gdc.test/runnable/test42.d +++ b/gcc/testsuite/gdc.test/runnable/test42.d @@ -4963,20 +4963,35 @@ struct Test244 { int noswap245(ubyte *data) { - return - (data[0]<< 0) | - (data[1]<< 8) | - (data[2]<< 16) | - (data[3]<< 24); + version (LittleEndian) + return + (data[0]<< 0) | + (data[1]<< 8) | + (data[2]<< 16) | + (data[3]<< 24); + version (BigEndian) + return + (data[0]<< 24) | + (data[1]<< 16) | + (data[2]<< 8) | + (data[3]<< 0); + } int bswap245(ubyte *data) { - return - (data[0]<< 24) | - (data[1]<< 16) | - (data[2]<< 8 ) | - (data[3]<< 0 ); + version (LittleEndian) + return + (data[0]<< 24) | + (data[1]<< 16) | + (data[2]<< 8) | + (data[3]<< 0); + version (BigEndian) + return + (data[0]<< 0) | + (data[1]<< 8) | + (data[2]<< 16) | + (data[3]<< 24); } void test245() -- 2.30.2