[r11-6253 Regression] FAIL: gfortran.dg/unlimited_polymorphic_32.f03 -Os execution test on Linux/x86_64

dhumieres.dominique@free.fr dhumieres.dominique@free.fr
Sun Dec 20 13:00:33 GMT 2020


Hi Paul,

I confirme the problem with -m32.
With the following changes:

% diff -up 
/opt/gcc/work/gcc/testsuite/gfortran.dg/unlimited_polymorphic_32.f03 
unlimited_polymorphic_32_db.f03
--- 
/opt/gcc/work/gcc/testsuite/gfortran.dg/unlimited_polymorphic_32.f03	2020-12-19 
12:39:07.000000000 +0100
+++ unlimited_polymorphic_32_db.f03	2020-12-20 13:52:36.000000000 +0100
@@ -17,8 +17,8 @@ contains
    subroutine driver
      class(*), allocatable :: obj
      type(Wrapper) w
-    integer(4) :: expected4(2) = [42_4, 43_4]
-    integer(8) :: expected8(3) = [42_8, 43_8, 44_8]
+    integer(4) :: expected4(3) = [42_4, 43_4, 44_4]
+    integer(8) :: expected8(5) = [42_8, 43_8, 44_8, 45_8, 46_8]

      w = new_wrapper (expected4)
      obj = w
@@ -42,18 +42,18 @@ contains
        type is (wrapper)
          select type (z => arg%elements)
            type is (integer(4))
-            if (any (z .ne. [42_4, 43_4])) stop 1 + idx
+            if (any (z .ne. [42_4, 43_4, 44_4])) stop 1 + idx
            type is (integer(8))
-            if (any (z .ne. [42_8, 43_8, 44_8])) stop 1 + idx
+            if (any (z .ne. [42_8, 43_8, 44_8, 45_8, 46_8])) print *, z
            type is (Mytype)
-            if (abs (z(1)%r - 99.0) .ge. 1e-6) stop 1 + idx
+            if (abs (z(1)%r - 99.0) .ge. 1e-6) stop 3 + idx
          class default
            stop 2 + idx
          end select
        type is (Mytype)
-        if (abs (arg%r - 42.0) .ge. 1e-6) stop 1 + idx
+        if (abs (arg%r - 42.0) .ge. 1e-6) stop 4 + idx
        class default
-        stop 3 + idx
+        stop 5 + idx
      end select
    end subroutine
  end

I get

% gfc unlimited_polymorphic_32_db.f03 -m32
% ./a.out
                    42                   43                   44          
          45                   42


More information about the Fortran mailing list