This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
[gfortran, committed] Correct gfotran.dg/pr15324.f90
- From: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- To: GCC Fortran mailing list <fortran at gcc dot gnu dot org>,patch <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 25 Sep 2004 14:49:49 +0200
- Subject: [gfortran, committed] Correct gfotran.dg/pr15324.f90
The testcase set the extents of the array inconsistently: whereas it had n+1
elements in the main program, it only had n elements in the subroutine bar.
I ran into this while trying to fix PR17612, unfortunately the problem I am
seeing with my fix was not related to this :(
Fixed as appended, tested and committed.
- Tobi
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/ChangeLog,v
retrieving revision 1.4348
diff -u -p -r1.4348 ChangeLog
--- ChangeLog 25 Sep 2004 10:54:14 -0000 1.4348
+++ ChangeLog 25 Sep 2004 12:47:48 -0000
@@ -1,3 +1,7 @@
+2004-09-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
+
+ * gfortran.dg/pr15324.f90: Make array bounds consistent.
+
2004-09-25 Jan Hubicka <jh@suse.cz>
* compile/30040909-1.c: New test.
Index: gfortran.dg/pr15324.f90
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gfortran.dg/pr15324.f90,v
retrieving revision 1.1
diff -u -p -r1.1 pr15324.f90
--- gfortran.dg/pr15324.f90 15 Jul 2004 14:59:15 -0000 1.1
+++ gfortran.dg/pr15324.f90 25 Sep 2004 12:47:48 -0000
@@ -4,7 +4,7 @@
program strarray_6
character(5), dimension(:), allocatable :: c
n = 3
-allocate(c(-1:n-1))
+allocate(c(-1:n-2))
c = "BLUBB"
call foo(c)
call bar(c,n)