diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-11-20 08:41:32 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-11-20 08:41:32 +0000 |
commit | 03248b193e6bac947221d44cc4dff913183cb5ae (patch) | |
tree | e2c9a37069b356f4cb760951f499abdac631e293 /libgfortran/generated/reshape_i8.c | |
parent | d7cbb3ef81425f9adec25287428049a99320c479 (diff) | |
download | gcc-03248b193e6bac947221d44cc4dff913183cb5ae.tar.gz |
2008-11-20 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r142033
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@142036 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/generated/reshape_i8.c')
-rw-r--r-- | libgfortran/generated/reshape_i8.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libgfortran/generated/reshape_i8.c b/libgfortran/generated/reshape_i8.c index 8c51795f1ff..9a2ce8d45dd 100644 --- a/libgfortran/generated/reshape_i8.c +++ b/libgfortran/generated/reshape_i8.c @@ -137,7 +137,7 @@ reshape_8 (gfc_array_i8 * const restrict ret, source_extent = source->dim[0].ubound + 1 - source->dim[0].lbound; - if (rs != source_extent) + if (rs < source_extent || (rs > source_extent && !pad)) runtime_error("Incorrect size in SOURCE argument to RESHAPE" " intrinsic: is %ld, should be %ld", (long int) source_extent, (long int) rs); @@ -262,16 +262,16 @@ reshape_8 (gfc_array_i8 * const restrict ret, if (sempty) { - /* Switch immediately to the pad array. */ + /* Pretend we are using the pad array the first time around, too. */ src = pptr; - sptr = NULL; + sptr = pptr; sdim = pdim; for (dim = 0; dim < pdim; dim++) { scount[dim] = pcount[dim]; sextent[dim] = pextent[dim]; sstride[dim] = pstride[dim]; - sstride0 = sstride[0] * sizeof (GFC_INTEGER_8); + sstride0 = pstride[0]; } } |