[gcc r15-11508] testsuite: explicitly specify expected endianness [PR126650]
Alexandre Oliva
aoliva@gcc.gnu.org
Wed Aug 26 04:21:11 GMT 2026
https://gcc.gnu.org/g:48e45185200154befd9f18bb5a4a3496270d0842
commit r15-11508-g48e45185200154befd9f18bb5a4a3496270d0842
Author: Alexandre Oliva <oliva@adacore.com>
Date: Wed Aug 26 01:02:50 2026 -0300
testsuite: explicitly specify expected endianness [PR126650]
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.
for gcc/testsuite/ChangeLog
PR tree-optimization/126650
* gcc.dg/torture/pr126650.c: Be explicit about endianness
expectations.
(cherry picked from commit ea6bfeafc48af3e6dab598376dda4586752ed990)
Diff:
---
gcc/testsuite/gcc.dg/torture/pr126650.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gcc/testsuite/gcc.dg/torture/pr126650.c b/gcc/testsuite/gcc.dg/torture/pr126650.c
index 166705d9cfe6..befeba5259a4 100644
--- a/gcc/testsuite/gcc.dg/torture/pr126650.c
+++ b/gcc/testsuite/gcc.dg/torture/pr126650.c
@@ -1,4 +1,4 @@
-/* { dg-do run } */
+/* { dg-do run { target { le || be } } } */
#include <stdarg.h>
#include <stdlib.h>
@@ -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];
More information about the Gcc-cvs
mailing list