diff options
author | Steven G. Kargl <kargls@comcast.net> | 2004-06-21 22:25:12 +0000 |
---|---|---|
committer | Paul Brook <pbrook@gcc.gnu.org> | 2004-06-21 22:25:12 +0000 |
commit | 0bf68c6eabb671e2c02a8fabf76120cc1834da77 (patch) | |
tree | 519d152e6fa6852974d79bcbc3bde28c0978f567 | |
parent | fa84120041353fa15ba2345e4442ec9e10ffc25b (diff) | |
download | gcc-0bf68c6eabb671e2c02a8fabf76120cc1834da77.zip gcc-0bf68c6eabb671e2c02a8fabf76120cc1834da77.tar.gz gcc-0bf68c6eabb671e2c02a8fabf76120cc1834da77.tar.bz2 |
etime.c (etime_sub): Remove array rank check; Add check for sufficient space.
* etime.c (etime_sub): Remove array rank check;
Add check for sufficient space.
From-SVN: r83456
-rw-r--r-- | libgfortran/ChangeLog | 5 | ||||
-rw-r--r-- | libgfortran/intrinsics/etime.c | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 36abe2a..107f903 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,8 @@ +2004-06-21 Steven G. Kargl <kargls@comcast.net> + + * etime.c (etime_sub): Remove array rank check; + Add check for sufficient space. + 2004-06-19 Bud Davis <bdavis9659@comcast.net> PR gfortran/16080 diff --git a/libgfortran/intrinsics/etime.c b/libgfortran/intrinsics/etime.c index 89ee539..cd11af9 100644 --- a/libgfortran/intrinsics/etime.c +++ b/libgfortran/intrinsics/etime.c @@ -57,9 +57,8 @@ prefix(etime_sub) (gfc_array_r4 *t, GFC_REAL_4 *result) tt = -1.; #endif - dim = GFC_DESCRIPTOR_RANK (t); - if (dim != 1) - runtime_error ("Array rank of TARRAY is not 1."); + if (((t->dim[0].ubound + 1 - t->dim[0].lbound)) < 2) + runtime_error ("Insufficient number of elements in TARRAY."); if (t->dim[0].stride == 0) t->dim[0].stride = 1; |