This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix gfortran.dg/unlimited_polymorphic_13.f90


Tested on {x86_64,m68k}-suse-linux and installed as obvious.

Andreas.

	PR testsuite/58851
	* gfortran.dg/unlimited_polymorphic_13.f90: Properly compute
	storage size.
---
 gcc/testsuite/gfortran.dg/unlimited_polymorphic_13.f90 | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_13.f90 b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_13.f90
index 0e27b17..8225738 100644
--- a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_13.f90
+++ b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_13.f90
@@ -23,18 +23,24 @@ contains
     integer :: k
     integer :: sz
 
+    sz = 0
     select case (k)
      case (4)
       sz = storage_size(r1)*2
+    end select
+    select case (k)
      case (8)
       sz = storage_size(r2)*2
-     case (10)
+    end select
+    select case (k)
+     case (real_kinds(size(real_kinds)-1))
       sz = storage_size(r3)*2
-     case (16)
+    end select
+    select case (k)
+     case (real_kinds(size(real_kinds)))
       sz = storage_size(r4)*2
-     case default
-       call abort()
     end select
+    if (sz .eq. 0) call abort()
 
     if (storage_size(o) /= sz) call abort()
 
-- 
1.9.0

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]