https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128033

Mikael Morin <mikael at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.5
            Summary|Array allocation from       |[14/15/16/17 regression]
                   |polymorphic pointer source  |Array allocation from
                   |doesn't correctly copy the  |polymorphic pointer source
                   |values                      |doesn't correctly copy the
                   |                            |values

--- Comment #3 from Mikael Morin <mikael at gcc dot gnu.org> ---
With the testcase amended as follows, the test passes with gfortran-12.5, so
this is a regression.

@@ -35,10 +34,16 @@
    subroutine check(x, y, e)
       integer, target, dimension(:), intent(in) :: x, y
       integer, intent(in) :: e
+      character(4) :: status
       integer :: i
       if (size(x) /= size(y)) error stop e*10+8
       do i=1,size(x)
-         print *, e*10+i, (x(i) == y(i) ? "PASS" : "FAIL"), x(i), y(i)
+         if (x(i) == y(i)) then
+            status = "PASS"
+         else
+            status = "FAIL"
+         end if
+         print *, e*10+i, status, x(i), y(i)
       end do
       !if (any(x /= y)) error stop e*10+9
    end subroutine

Reply via email to