diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2007-03-08 09:09:38 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2007-03-08 09:09:38 +0000 |
commit | e1e24dc19fdafe3b4f3546036c7ffe27e7fa458e (patch) | |
tree | 4cb8e99c383163f57a3dbf5b820f948d8303dd4e /gcc/testsuite | |
parent | 1916c916caf5b22b43ba62974586ffbd3b89b406 (diff) | |
download | gcc-e1e24dc19fdafe3b4f3546036c7ffe27e7fa458e.zip gcc-e1e24dc19fdafe3b4f3546036c7ffe27e7fa458e.tar.gz gcc-e1e24dc19fdafe3b4f3546036c7ffe27e7fa458e.tar.bz2 |
re PR fortran/31011 ([4.2 and 4.1 only] Incorrect error: parameter array sections)
2007-03-08 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31011
* expr.c (find_array_section): Correct arithmetic for section
size.
2007-03-08 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31011
* gfortran.dg/parameter_array_section_2.f90: New test.
From-SVN: r122689
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/parameter_array_section_2.f90 | 14 |
2 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 81dd95d..6267c8a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-03-08 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/31011
+ * gfortran.dg/parameter_array_section_2.f90: New test.
+ 2007-03-08 Volker Reichelt <reichelt@netcologne.de> PR c++/30852 diff --git a/gcc/testsuite/gfortran.dg/parameter_array_section_2.f90 b/gcc/testsuite/gfortran.dg/parameter_array_section_2.f90 new file mode 100644 index 0000000..aa212c0 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/parameter_array_section_2.f90 @@ -0,0 +1,14 @@ +! { dg-do run } +! { dg-options "-O" } +! Test the fix for PR31011 in which the length of the array sections +! with stride other than unity were incorrectly calculated. +! +! Contributed by <terry@chem.gu.se> +! +program PotentialMatrix + implicit none + real(kind=8),dimension(2),parameter::v2=(/1,2/) + real(kind=8),dimension(4),parameter::v4=(/1,2,3,4/) + if (any (v2*v4(1:3:2) .ne. (/1,6/))) call abort () + if (any (v2*v4(3:1:-2) .ne. (/3,2/))) call abort () +end |