[Bug libfortran/34540] [4.3 Regression] cshift, eoshift, kind=1 and kind=2 arguments...

tkoenig at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sat Dec 22 09:32:00 GMT 2007



------- Comment #9 from tkoenig at gcc dot gnu dot org  2007-12-22 09:32 -------
Hi Jerry,

thanks for the quick fix.

I don't have time for testing right now, but maybe you
can also check that

module tst_foo
  implicit none
contains
  subroutine tst_optional(a,n1,n2)
    real, dimension(:,:) :: a
    integer(kind=1), intent(in), optional:: n1
    integer(kind=2), intent(in), optional:: n2
    integer(kind=1), dimension(2) :: s1
    s1 = (/1, 1/)
    print *,cshift(a,shift=s1,dim=n1)
    print *,cshift(a,shift=s1,dim=n2)
    print *,eoshift(a,shift=s1,dim=n1)
    print *,eoshift(a,shift=s1,dim=n2)
  end subroutine tst_optional
end module tst_foo

program main
  use tst_foo
  implicit none
  real, dimension(2,2) :: r
  integer(kind=1) :: d1
  integer(kind=2) :: d2
  data r /1.0, 2.0, 3.0, 4.0/
  d1 = 1_1
  d2 = 1_2
  call tst_optional(r, d1,d2)
end program main

works?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34540



More information about the Gcc-bugs mailing list