I just committed the fix for PR 116653 as obvious.
Unfortunately, I left out the description in the ChangeLog, I hope it
is clear enough.
Best regards
Thomas
https://gcc.gnu.org/g:5d9486c29938d79beb798dce1a5509da54fe8c9f
commit r15-3619-g5d9486c29938d79beb798dce1a5509da54fe8c9f
Author: Thomas Koenig <tkoe...@gcc.gnu.org>
Date: Fri Sep 13 07:47:24 2024 +0200
Fix endianness issue on unsigned_21.f90.
gcc/testsuite/ChangeLog:
PR fortran/116653
* gfortran.dg/unsigned_21.f90:
* gfortran.dg/unsigned_21_be.f90: New test.
diff --git a/gcc/testsuite/gfortran.dg/unsigned_21.f90
b/gcc/testsuite/gfortran.dg/unsigned_21.f90
index 23302c7eabe..c3f65a469dc 100644
--- a/gcc/testsuite/gfortran.dg/unsigned_21.f90
+++ b/gcc/testsuite/gfortran.dg/unsigned_21.f90
@@ -1,5 +1,6 @@
! { dg-do run }
! { dg-options "-funsigned" }
+! { dg-require-effective-target le }
program main
integer :: i
integer(2) :: j
diff --git a/gcc/testsuite/gfortran.dg/unsigned_21_be.f90
b/gcc/testsuite/gfortran.dg/unsigned_21_be.f90
new file mode 100644
index 00000000000..64fecd9cd4a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/unsigned_21_be.f90
@@ -0,0 +1,14 @@
+! { dg-do run }
+! { dg-options "-funsigned" }
+! { dg-require-effective-target be }
+program main
+ integer :: i
+ integer(2) :: j
+ unsigned :: u
+ i = -1
+ u = transfer(i,u)
+ if (u /= huge(u)) error stop 1
+ u = 4278058235u
+ j = transfer(u,j)
+ if (j /= -259) error stop 2
+end program main