This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Patch, submitted, Fortran] Fix gfortran.dg/bounds_check_10.f90 (was: Re: FAIL: gfortran.dg/bounds_check_10.f90)
- From: Tobias Burnus <burnus at net-b dot de>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Cc: fortran at gcc dot gnu dot org
- Date: Sun, 14 Oct 2007 12:11:02 +0200
- Subject: [Patch, submitted, Fortran] Fix gfortran.dg/bounds_check_10.f90 (was: Re: FAIL: gfortran.dg/bounds_check_10.f90)
- References: <20071014085459.8B5335BB9F@mailhost.lps.ens.fr>
Dominique Dhumieres wrote:
>> Anyone else seeing this?
>>
> z = [y(1:1), x(1:len(trim(x)))] ! should work
> 1
> Error: Different shape for array assignment at (1) on dimension 1 (3 and 2)
>
I see this as well (with several compilers) and committed (Rev129293)
the following patch, after successfully running
make check-gfortran RUNTESTFLAGS="dg.exp=bounds_check_10.f90"
Tobias
Index: ChangeLog
===================================================================
--- ChangeLog (Revision 129292)
+++ ChangeLog (Arbeitskopie)
@@ -1,3 +1,7 @@
+2007-10-13 Tobias Burnus <burnus@gcc.gnu.org>
+
+ * gfortran.dg/bounds_check_10.f90: Fix testcase.
+
2007-10-13 Tobias Schlüter <tobi@gcc.gnu.org>
Paul Thomas <pault@gcc.gnu.org>
Index: gfortran.dg/bounds_check_10.f90
===================================================================
--- gfortran.dg/bounds_check_10.f90 (Revision 129292)
+++ gfortran.dg/bounds_check_10.f90 (Arbeitskopie)
@@ -8,7 +8,7 @@
character (len=2) :: z(3)
x = "a "
y = "cd"
-z = [y(1:1), x(1:len(trim(x)))] ! should work
+z = [y(1:1), y(1:1), x(1:len(trim(x)))] ! should work
z = [trim(x), trim(y), "aaaa"] ! [ "a", "cd", "aaaa" ] should catch
first error
end program array_char