diff options
author | mikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-01-19 22:19:34 +0000 |
---|---|---|
committer | mikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-01-19 22:19:34 +0000 |
commit | fef578d405d6aef6fa07bf5053b8bdb9ce153904 (patch) | |
tree | f4dece352a8ed71d31519c9053b6277246a3edc4 /gcc/testsuite/gfortran.dg | |
parent | c950adc6e1f2c8cab7e6bfa81c22b25158623e69 (diff) | |
download | gcc-fef578d405d6aef6fa07bf5053b8bdb9ce153904.tar.gz |
2009-01-19 Mikael Morin <mikael.morin@tele2.fr>
PR fortran/38859
* simplify.c (simplify_bound): Don't use array specification
if variable or component has subsequent references.
2009-01-19 Mikael Morin <mikael.morin@tele2.fr>
PR fortran/38859
* gfortran.dg/bound_5.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143501 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gfortran.dg')
-rw-r--r-- | gcc/testsuite/gfortran.dg/bound_5.f90 | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/bound_5.f90 b/gcc/testsuite/gfortran.dg/bound_5.f90 new file mode 100644 index 00000000000..04245d6d869 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/bound_5.f90 @@ -0,0 +1,26 @@ +! { dg-do run } +! +! PR fortran/38859 +! Wrong bounds simplification +! +! Contributed by Dick Hendrickson <dick.hendrickson@gmail.com> + + type x + integer I + end type x + type (x) A(0:5, 2:8) + integer ida(2) + + ida = lbound(a) + if (any(ida /= (/0,2/))) call abort + + ida = lbound(a%i) + if (any(ida /= (/1,1/))) call abort + + ida = ubound(a) + if (any(ida /= (/5,8/))) call abort + + ida = ubound(a%i) + if (any(ida /= (/6,7/))) call abort + + end |