From 0bf68c6eabb671e2c02a8fabf76120cc1834da77 Mon Sep 17 00:00:00 2001 From: "Steven G. Kargl" Date: Mon, 21 Jun 2004 22:25:12 +0000 Subject: [PATCH] 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 --- libgfortran/ChangeLog | 5 +++++ libgfortran/intrinsics/etime.c | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 36abe2a193d..107f9035356 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,8 @@ +2004-06-21 Steven G. Kargl + + * etime.c (etime_sub): Remove array rank check; + Add check for sufficient space. + 2004-06-19 Bud Davis PR gfortran/16080 diff --git a/libgfortran/intrinsics/etime.c b/libgfortran/intrinsics/etime.c index 89ee539f064..cd11af927c6 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; -- 2.30.2