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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |---
             Status|RESOLVED                    |REOPENED

--- Comment #12 from anlauf at gcc dot gnu.org ---
Paul, can I ask you to revert commit r14-10477 asap?

The following code - extracted from a larger code base - miscompiles with it:

program p
  implicit none
  integer, parameter :: nx = 64, ny = 32
  real               :: x(nx,ny), s(nx/2,ny), d(nx/2,ny)
  print *, shape (x), shape (s), shape (d)
  call sub (x,s,d)
contains
  subroutine sub  (v, w, d)
    real, intent(in)  :: v(:,:)
    real, intent(out), dimension (size (v,dim=1)/2,size (v,dim=2)) :: w, d
    print *, shape (v), shape (w), shape (d)
  end subroutine sub
end

Correct output should be:

          64          32          32          32          32          32
          64          32          32          32          32          32

With 15-trunk and 14 after the above commit I get - dependent on -Ox:

          64          32          32          32          32          32
          64          32          32          32   363993500           0

or

          64          32          32          32          32          32
          64          32          32          32           0           0

Reducing the testcase further make the commit look innocent, however...

Reply via email to