The pr126650.c testcase carries an expectation that the data
structures are little endian; we don't get the expected results
otherwise.  Make the nonscalars explicitly little-endian.

Tested on x86_64-linux-gnu, ppc-elf and leon3-elf.  I'm tempted to put
it in as obvious, but just in case someone would rather fix it
differently...  Ok to install?


for  gcc/testsuite/ChangeLog

        PR tree-optimization/126650
        * gcc.dg/torture/pr126650.c: Be explicit about endianness
        expectations.
---
 gcc/testsuite/gcc.dg/torture/pr126650.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/torture/pr126650.c 
b/gcc/testsuite/gcc.dg/torture/pr126650.c
index 166705d9cfe6d..a6ca31095fffb 100644
--- a/gcc/testsuite/gcc.dg/torture/pr126650.c
+++ b/gcc/testsuite/gcc.dg/torture/pr126650.c
@@ -17,14 +17,14 @@ void __attribute__((noipa)) foo (int n, ...)
 
 int main()
 {
-  struct b {
+  struct __attribute__ ((scalar_storage_order ("little-endian"))) b {
     int : 7;
     int : 2;
     int : 6;
     int : 3;
     int c : 7;
   };
-  union {
+  union __attribute__ ((scalar_storage_order ("little-endian"))) {
     int d;
     struct b bf;
     char e[4];

-- 
Alexandre Oliva, happy hacker            https://blog.lx.oliva.nom.br/
Free Software Activist     FSFLA co-founder     GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity.
Excluding neuro-others for not behaving ""normal"" is *not* inclusive!

Reply via email to