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]

Re: [PATCH] Debug support for Fortran 90 assumed shape and other descriptor using arrays (PR fortran/22244)


On Fri, Nov 16, 2007 at 05:36:53PM +0100, Tobias Burnus wrote:
> Tobias Burnus wrote:
> > Regarding the test case a4.f90 and a4.f90: I get for x(3,1) with
> > gfortran a "10.0" but with g95, nag f95 and ifort a "4.0", which
> > indicates a bug in gfortran.
> >   
> 
> This is not a bug in gfortran but a bug in the program. A minimal test
> case is:
> 
> program prog
>   implicit none
>   integer :: a(2,2)
>   a = 0
>   call test(transpose(a))
>   print *, a
> contains
>   subroutine test(x)
>     ! intent(out) :: x ! uncommenting this gives a compile error
>     integer :: x(:,:)
>     x = 3
>   end subroutine test
> end program prog

Ok.  The testcase was definitely meant to see the array with the swapped
strides to see if the debugger can see it.  If it can't assign it, it should
just take another (say logical) argument and for the second case just
read/compare the values rather than testing what ended up in the caller's
array.  The testcase isn't meant for gcc testsuite anyway.
Or if you have better ideas how to get arrays with really weird stride
setups, I think Jan will appreciate that for GDB testsuite.

	Jakub


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