aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorTobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>2005-03-01 01:41:41 +0100
committerTobias Schlüter <tobi@gcc.gnu.org>2005-03-01 01:41:41 +0100
commit2a4a78303029ec0f3765450a918e5677370d1106 (patch)
tree5e4997c1b9fc6c6c38a193b48e6f7f8d60f87a80 /gcc/testsuite
parentba751280b20e9d870c185b2c7decfcc2a2d72c3b (diff)
downloadgcc-2a4a78303029ec0f3765450a918e5677370d1106.zip
gcc-2a4a78303029ec0f3765450a918e5677370d1106.tar.gz
gcc-2a4a78303029ec0f3765450a918e5677370d1106.tar.bz2
re PR fortran/19479 (UBOUND causes ICE)
fortran/ PR fortran/19479 * simplify.c (gfc_simplify_bound): Rename to ... (simplify_bound): ... this and overhaul. testsuite/ PR fortran/19479 * gfortran.dg/bound_1.f90: New test. From-SVN: r95713
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/bound_1.f9020
2 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index a58496b..26fa08c 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2005-02-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
+
+ PR fortran/19479
+ * gfortran.dg/bound_1.f90: New test.
+
2005-02-28 Janis Johnson <janis187@us.ibm.com>
* gcc.test-framework/dg-error-exp-P.c: Update message for new C parser.
diff --git a/gcc/testsuite/gfortran.dg/bound_1.f90 b/gcc/testsuite/gfortran.dg/bound_1.f90
new file mode 100644
index 0000000..ce872bb
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/bound_1.f90
@@ -0,0 +1,20 @@
+! { dg-do run }
+ implicit none
+
+ type test_type
+ integer, dimension(5) :: a
+ end type test_type
+
+ type (test_type), target :: tt(2)
+ integer i
+
+ i = ubound(tt(1)%a, 1)
+ if (i/=5) call abort()
+ i = lbound(tt(1)%a, 1)
+ if (i/=1) call abort()
+
+ i = ubound(tt, 1)
+ if (i/=2) call abort()
+ i = lbound(tt, 1)
+ if (i/=1) call abort()
+end