diff options
author | Janne Blomqvist <jb@gcc.gnu.org> | 2006-06-06 11:10:09 +0300 |
---|---|---|
committer | Janne Blomqvist <jb@gcc.gnu.org> | 2006-06-06 11:10:09 +0300 |
commit | 6ff24d45dc7bf2691b6c2c3f9e9830360dc572a6 (patch) | |
tree | 88f8e06667bc01f3aee614a92f3130c18d864edd /libgfortran/intrinsics | |
parent | 0d3b0abea32c88c867948cd1786bd9df3634ac89 (diff) | |
download | gcc-6ff24d45dc7bf2691b6c2c3f9e9830360dc572a6.zip gcc-6ff24d45dc7bf2691b6c2c3f9e9830360dc572a6.tar.gz gcc-6ff24d45dc7bf2691b6c2c3f9e9830360dc572a6.tar.bz2 |
in_pack.m4: Add TODO comment about detecting temporaries...
2006-06-06 Janne Blomqvist <jb@gcc.gnu.org>
* m4/in_pack.m4: Add TODO comment about detecting temporaries,
remove test for stride 0, update copyright year.
* m4/transpose.m4: Remove test for stride 0, update copyright
year.
* m4/iforeach.m4: Likewise.
* m4/shape.m4: Likewise.
* m4/in_unpack.m4: Likewise.
* m4/reshape.m4: Likewise.
* m4/ifunction.m4: Likewise.
* m4/matmul.m4: Likewise.
* m4/matmull.m4: Likewise.
* intrinsics/etime.c: Likewise.
* intrinsics/transpose_generic.c: Likewise.
* intrinsics/spread_generic.c: Likewise.
* intrinsics/stat.c: Likewise.
* intrinsics/reshape_generic.c: Likewise.
* intrinsics/random.c: Likewise.
* generated/*: Regenerated from above changed m4 files.
From-SVN: r114424
Diffstat (limited to 'libgfortran/intrinsics')
-rw-r--r-- | libgfortran/intrinsics/etime.c | 5 | ||||
-rw-r--r-- | libgfortran/intrinsics/random.c | 14 | ||||
-rw-r--r-- | libgfortran/intrinsics/reshape_generic.c | 13 | ||||
-rw-r--r-- | libgfortran/intrinsics/spread_generic.c | 8 | ||||
-rw-r--r-- | libgfortran/intrinsics/stat.c | 14 | ||||
-rw-r--r-- | libgfortran/intrinsics/transpose_generic.c | 6 |
6 files changed, 6 insertions, 54 deletions
diff --git a/libgfortran/intrinsics/etime.c b/libgfortran/intrinsics/etime.c index 547e10f..6263d4d 100644 --- a/libgfortran/intrinsics/etime.c +++ b/libgfortran/intrinsics/etime.c @@ -1,5 +1,5 @@ /* Implementation of the ETIME intrinsic. - Copyright (C) 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. Contributed by Steven G. Kargl <kargls@comcast.net>. This file is part of the GNU Fortran 95 runtime library (libgfortran). @@ -71,9 +71,6 @@ etime_sub (gfc_array_r4 *t, GFC_REAL_4 *result) 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; - tp = t->data; *tp = tu; diff --git a/libgfortran/intrinsics/random.c b/libgfortran/intrinsics/random.c index d77a381..9ea2889 100644 --- a/libgfortran/intrinsics/random.c +++ b/libgfortran/intrinsics/random.c @@ -1,5 +1,5 @@ /* Implementation of the RANDOM intrinsics - Copyright 2002, 2004, 2005 Free Software Foundation, Inc. + Copyright 2002, 2004, 2005, 2006 Free Software Foundation, Inc. Contributed by Lars Segerlund <seger@linuxmail.org> and Steve Kargl. @@ -188,9 +188,6 @@ arandom_r4 (gfc_array_r4 *x) dest = x->data; - if (x->dim[0].stride == 0) - x->dim[0].stride = 1; - dim = GFC_DESCRIPTOR_RANK (x); for (n = 0; n < dim; n++) @@ -261,9 +258,6 @@ arandom_r8 (gfc_array_r8 *x) dest = x->data; - if (x->dim[0].stride == 0) - x->dim[0].stride = 1; - dim = GFC_DESCRIPTOR_RANK (x); for (n = 0; n < dim; n++) @@ -349,9 +343,6 @@ random_seed (GFC_INTEGER_4 *size, gfc_array_i4 *put, gfc_array_i4 *get) if (((put->dim[0].ubound + 1 - put->dim[0].lbound)) < kiss_size) runtime_error ("Array size of PUT is too small."); - if (put->dim[0].stride == 0) - put->dim[0].stride = 1; - /* This code now should do correct strides. */ for (i = 0; i < kiss_size; i++) kiss_seed[i] =(GFC_UINTEGER_4) put->data[i * put->dim[0].stride]; @@ -368,9 +359,6 @@ random_seed (GFC_INTEGER_4 *size, gfc_array_i4 *put, gfc_array_i4 *get) if (((get->dim[0].ubound + 1 - get->dim[0].lbound)) < kiss_size) runtime_error ("Array size of GET is too small."); - if (get->dim[0].stride == 0) - get->dim[0].stride = 1; - /* This code now should do correct strides. */ for (i = 0; i < kiss_size; i++) get->data[i * get->dim[0].stride] = (GFC_INTEGER_4) kiss_seed[i]; diff --git a/libgfortran/intrinsics/reshape_generic.c b/libgfortran/intrinsics/reshape_generic.c index 8cbdc89..4f05416 100644 --- a/libgfortran/intrinsics/reshape_generic.c +++ b/libgfortran/intrinsics/reshape_generic.c @@ -1,5 +1,5 @@ /* Generic implementation of the RESHAPE intrinsic - Copyright 2002 Free Software Foundation, Inc. + Copyright 2002, 2006 Free Software Foundation, Inc. Contributed by Paul Brook <paul@nowt.org> This file is part of the GNU Fortran 95 runtime library (libgfortran). @@ -74,15 +74,6 @@ reshape_internal (parray *ret, parray *source, shape_type *shape, int n; int dim; - if (source->dim[0].stride == 0) - source->dim[0].stride = 1; - if (shape->dim[0].stride == 0) - shape->dim[0].stride = 1; - if (pad && pad->dim[0].stride == 0) - pad->dim[0].stride = 1; - if (order && order->dim[0].stride == 0) - order->dim[0].stride = 1; - if (ret->data == NULL) { rdim = shape->dim[0].ubound - shape->dim[0].lbound + 1; @@ -102,8 +93,6 @@ reshape_internal (parray *ret, parray *source, shape_type *shape, else { rdim = GFC_DESCRIPTOR_RANK (ret); - if (ret->dim[0].stride == 0) - ret->dim[0].stride = 1; } rsize = 1; diff --git a/libgfortran/intrinsics/spread_generic.c b/libgfortran/intrinsics/spread_generic.c index bdcc0d1..cbc5c49 100644 --- a/libgfortran/intrinsics/spread_generic.c +++ b/libgfortran/intrinsics/spread_generic.c @@ -1,5 +1,5 @@ /* Generic implementation of the SPREAD intrinsic - Copyright 2002, 2005 Free Software Foundation, Inc. + Copyright 2002, 2005, 2006 Free Software Foundation, Inc. Contributed by Paul Brook <paul@nowt.org> This file is part of the GNU Fortran 95 runtime library (libgfortran). @@ -109,9 +109,6 @@ spread_internal (gfc_array_char *ret, const gfc_array_char *source, if (GFC_DESCRIPTOR_RANK(ret) != rrank) runtime_error ("rank mismatch in spread()"); - if (ret->dim[0].stride == 0) - ret->dim[0].stride = 1; - for (n = 0; n < rrank; n++) { if (n == *along - 1) @@ -204,9 +201,6 @@ spread_internal_scalar (gfc_array_char *ret, const char *source, } else { - if (ret->dim[0].stride == 0) - ret->dim[0].stride = 1; - if (ncopies - 1 > (ret->dim[0].ubound - ret->dim[0].lbound) / ret->dim[0].stride) runtime_error ("dim too large in spread()"); diff --git a/libgfortran/intrinsics/stat.c b/libgfortran/intrinsics/stat.c index ac91204..ab134ab 100644 --- a/libgfortran/intrinsics/stat.c +++ b/libgfortran/intrinsics/stat.c @@ -1,5 +1,5 @@ /* Implementation of the STAT and FSTAT intrinsics. - Copyright (C) 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. Contributed by Steven G. Kargl <kargls@comcast.net>. This file is part of the GNU Fortran 95 runtime library (libgfortran). @@ -81,9 +81,6 @@ stat_i4_sub (char *name, gfc_array_i4 *sarray, GFC_INTEGER_4 *status, if (sarray->dim[0].ubound + 1 - sarray->dim[0].lbound < 13) runtime_error ("Array size of SARRAY is too small."); - if (sarray->dim[0].stride == 0) - sarray->dim[0].stride = 1; - /* Trim trailing spaces from name. */ while (name_len > 0 && name[name_len - 1] == ' ') name_len--; @@ -174,9 +171,6 @@ stat_i8_sub (char *name, gfc_array_i8 *sarray, GFC_INTEGER_8 *status, if (sarray->dim[0].ubound + 1 - sarray->dim[0].lbound < 13) runtime_error ("Array size of SARRAY is too small."); - if (sarray->dim[0].stride == 0) - sarray->dim[0].stride = 1; - /* Trim trailing spaces from name. */ while (name_len > 0 && name[name_len - 1] == ' ') name_len--; @@ -297,9 +291,6 @@ fstat_i4_sub (GFC_INTEGER_4 *unit, gfc_array_i4 *sarray, GFC_INTEGER_4 *status) if (sarray->dim[0].ubound + 1 - sarray->dim[0].lbound < 13) runtime_error ("Array size of SARRAY is too small."); - if (sarray->dim[0].stride == 0) - sarray->dim[0].stride = 1; - /* Convert Fortran unit number to C file descriptor. */ val = unit_to_fd (*unit); if (val >= 0) @@ -381,9 +372,6 @@ fstat_i8_sub (GFC_INTEGER_8 *unit, gfc_array_i8 *sarray, GFC_INTEGER_8 *status) if (sarray->dim[0].ubound + 1 - sarray->dim[0].lbound < 13) runtime_error ("Array size of SARRAY is too small."); - if (sarray->dim[0].stride == 0) - sarray->dim[0].stride = 1; - /* Convert Fortran unit number to C file descriptor. */ val = unit_to_fd ((int) *unit); if (val >= 0) diff --git a/libgfortran/intrinsics/transpose_generic.c b/libgfortran/intrinsics/transpose_generic.c index bd47073..1daae8b 100644 --- a/libgfortran/intrinsics/transpose_generic.c +++ b/libgfortran/intrinsics/transpose_generic.c @@ -1,5 +1,5 @@ /* Implementation of the TRANSPOSE intrinsic - Copyright 2003 Free Software Foundation, Inc. + Copyright 2003, 2006 Free Software Foundation, Inc. Contributed by Tobias Schlüter This file is part of the GNU Fortran 95 runtime library (libgfortran). @@ -71,15 +71,11 @@ transpose_internal (gfc_array_char *ret, gfc_array_char *source, } sxstride = source->dim[0].stride * size; - if (sxstride == 0) - sxstride = size; systride = source->dim[1].stride * size; xcount = source->dim[0].ubound + 1 - source->dim[0].lbound; ycount = source->dim[1].ubound + 1 - source->dim[1].lbound; rxstride = ret->dim[0].stride * size; - if (rxstride == 0) - rxstride = size; rystride = ret->dim[1].stride * size; rptr = ret->data; |