This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 0/6] fortran: multi-dimensional subarrays with strides
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: christoph dot t dot weinmann at intel dot com
- Cc: brobecker at adacore dot com, gdb-patches at sourceware dot org
- Date: Fri, 8 Jan 2016 19:44:08 +0100
- Subject: Re: [PATCH 0/6] fortran: multi-dimensional subarrays with strides
- Authentication-results: sourceware.org; auth=none
- References: <1448976075-11456-1-git-send-email-christoph dot t dot weinmann at intel dot com> <20151203205119 dot GA4098 at host1 dot jankratochvil dot net>
On Thu, 03 Dec 2015 21:51:19 +0100, Jan Kratochvil wrote:
> Just I see - reproducible with FSF GDB trunk - one new:
> FAIL: gdb.fortran/static-arrays.exp: print ar3(:2,:2,:2)
> happening on x86_64 in -m32 target mode and on i686 native host.
> It PASSes in the most common case of native x86_64. Tested on Fedora 23.
> print ar3(:2,:2,:2)^M
> -$52 = (( ( 111, 211) ( 121, 221) ) ( ( 112, 212) ( 122, 222) ) )^M
> -(gdb) PASS: gdb.fortran/static-arrays.exp: print ar3(:2,:2,:2)
> +$52 = (( ( 1221, 211) ( 121, 221) ) ( ( 112, 212) ( 122, 222) ) )^M
> +(gdb) FAIL: gdb.fortran/static-arrays.exp: print ar3(:2,:2,:2)
That was easier than I expected:
gfortran -fcheck=bounds
->
At line 44 of file gdb.fortran/static-arrays.f90
Fortran runtime error: Index '11' of dimension 1 of array 'ar4' above upper bound of 10
There is:
integer, dimension(10,-7:3, -15:-5) :: ar4
+
do i = 1, 11, 1
Jan
--- gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/static-arrays.f90-orig 2016-01-08 19:19:18.421828196 +0100
+++ gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/static-arrays.f90 2016-01-08 19:41:09.778142683 +0100
@@ -38,7 +38,7 @@ subroutine sub
end do
end do
- do i = 1, 11, 1
+ do i = 1, 10, 1
do j = -7, 3, 1
do k = -15, -5, 1
ar4(i,j,k) = i*100 + (j+8)*10 + (k+16)