summaryrefslogtreecommitdiff
path: root/libgfortran/m4
diff options
context:
space:
mode:
authorjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>2006-06-06 08:10:09 +0000
committerjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>2006-06-06 08:10:09 +0000
commitfff369f22c8f50cd4b6040f7860d38fed7aeb963 (patch)
tree88f8e06667bc01f3aee614a92f3130c18d864edd /libgfortran/m4
parentad82e5889ae755adf02837f5d1d71375b82da4a9 (diff)
downloadgcc-fff369f22c8f50cd4b6040f7860d38fed7aeb963.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114424 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/m4')
-rw-r--r--libgfortran/m4/iforeach.m422
-rw-r--r--libgfortran/m4/ifunction.m422
-rw-r--r--libgfortran/m4/in_pack.m49
-rw-r--r--libgfortran/m4/in_unpack.m45
-rw-r--r--libgfortran/m4/matmul.m411
-rw-r--r--libgfortran/m4/matmull.m49
-rw-r--r--libgfortran/m4/reshape.m413
-rw-r--r--libgfortran/m4/shape.m44
-rw-r--r--libgfortran/m4/transpose.m47
9 files changed, 9 insertions, 93 deletions
diff --git a/libgfortran/m4/iforeach.m4 b/libgfortran/m4/iforeach.m4
index 7d20213e9aa..6ff9427722e 100644
--- a/libgfortran/m4/iforeach.m4
+++ b/libgfortran/m4/iforeach.m4
@@ -41,16 +41,8 @@ name`'rtype_qual`_'atype_code (rtype * const restrict retarray,
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
runtime_error ("dimension of return array incorrect");
-
- if (retarray->dim[0].stride == 0)
- retarray->dim[0].stride = 1;
}
- /* TODO: It should be a front end job to correctly set the strides. */
-
- if (array->dim[0].stride == 0)
- array->dim[0].stride = 1;
-
dstride = retarray->dim[0].stride;
dest = retarray->data;
for (n = 0; n < rank; n++)
@@ -153,19 +145,8 @@ void
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
runtime_error ("dimension of return array incorrect");
-
- if (retarray->dim[0].stride == 0)
- retarray->dim[0].stride = 1;
}
- /* TODO: It should be a front end job to correctly set the strides. */
-
- if (array->dim[0].stride == 0)
- array->dim[0].stride = 1;
-
- if (mask->dim[0].stride == 0)
- mask->dim[0].stride = 1;
-
dstride = retarray->dim[0].stride;
dest = retarray->data;
for (n = 0; n < rank; n++)
@@ -291,9 +272,6 @@ void
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
runtime_error ("dimension of return array incorrect");
-
- if (retarray->dim[0].stride == 0)
- retarray->dim[0].stride = 1;
}
dstride = retarray->dim[0].stride;
diff --git a/libgfortran/m4/ifunction.m4 b/libgfortran/m4/ifunction.m4
index d1a34da00b1..74ae6a5d5e4 100644
--- a/libgfortran/m4/ifunction.m4
+++ b/libgfortran/m4/ifunction.m4
@@ -44,11 +44,6 @@ name`'rtype_qual`_'atype_code (rtype * const restrict retarray,
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
- /* TODO: It should be a front end job to correctly set the strides. */
-
- if (array->dim[0].stride == 0)
- array->dim[0].stride = 1;
-
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
delta = array->dim[dim].stride;
@@ -85,9 +80,6 @@ name`'rtype_qual`_'atype_code (rtype * const restrict retarray,
}
else
{
- if (retarray->dim[0].stride == 0)
- retarray->dim[0].stride = 1;
-
if (rank != GFC_DESCRIPTOR_RANK (retarray))
runtime_error ("rank of return array incorrect");
}
@@ -184,14 +176,6 @@ void
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
- /* TODO: It should be a front end job to correctly set the strides. */
-
- if (array->dim[0].stride == 0)
- array->dim[0].stride = 1;
-
- if (mask->dim[0].stride == 0)
- mask->dim[0].stride = 1;
-
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;
@@ -233,9 +217,6 @@ void
}
else
{
- if (retarray->dim[0].stride == 0)
- retarray->dim[0].stride = 1;
-
if (rank != GFC_DESCRIPTOR_RANK (retarray))
runtime_error ("rank of return array incorrect");
}
@@ -360,9 +341,6 @@ void
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
runtime_error ("dimension of return array incorrect");
-
- if (retarray->dim[0].stride == 0)
- retarray->dim[0].stride = 1;
}
dstride = retarray->dim[0].stride;
diff --git a/libgfortran/m4/in_pack.m4 b/libgfortran/m4/in_pack.m4
index cb5be529e7c..950919d0782 100644
--- a/libgfortran/m4/in_pack.m4
+++ b/libgfortran/m4/in_pack.m4
@@ -1,5 +1,5 @@
`/* Helper function for repacking arrays.
- Copyright 2003 Free Software Foundation, Inc.
+ Copyright 2003, 2006 Free Software Foundation, Inc.
Contributed by Paul Brook <paul@nowt.org>
This file is part of the GNU Fortran 95 runtime library (libgfortran).
@@ -56,11 +56,8 @@ rtype_name *
int n;
int packed;
- if (source->dim[0].stride == 0)
- {
- source->dim[0].stride = 1;
- return source->data;
- }
+ /* TODO: Investigate how we can figure out if this is a temporary
+ since the stride=0 thing has been removed from the frontend. */
dim = GFC_DESCRIPTOR_RANK (source);
ssize = 1;
diff --git a/libgfortran/m4/in_unpack.m4 b/libgfortran/m4/in_unpack.m4
index 131eb5d842a..d6ee7c6f738 100644
--- a/libgfortran/m4/in_unpack.m4
+++ b/libgfortran/m4/in_unpack.m4
@@ -1,5 +1,5 @@
`/* Helper function for repacking arrays.
- Copyright 2003 Free Software Foundation, Inc.
+ Copyright 2003, 2006 Free Software Foundation, Inc.
Contributed by Paul Brook <paul@nowt.org>
This file is part of the GNU Fortran 95 runtime library (libgfortran).
@@ -55,9 +55,6 @@ void
if (src == dest || !src)
return;
- if (d->dim[0].stride == 0)
- d->dim[0].stride = 1;
-
dim = GFC_DESCRIPTOR_RANK (d);
dsize = 1;
for (n = 0; n < dim; n++)
diff --git a/libgfortran/m4/matmul.m4 b/libgfortran/m4/matmul.m4
index 526303c9f39..f83837b77a9 100644
--- a/libgfortran/m4/matmul.m4
+++ b/libgfortran/m4/matmul.m4
@@ -1,5 +1,5 @@
`/* Implementation of the MATMUL 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).
@@ -121,15 +121,6 @@ matmul_`'rtype_code (rtype * const restrict retarray,
retarray->offset = 0;
}
- if (retarray->dim[0].stride == 0)
- retarray->dim[0].stride = 1;
-
- /* This prevents constifying the input arguments. */
- if (a->dim[0].stride == 0)
- a->dim[0].stride = 1;
- if (b->dim[0].stride == 0)
- b->dim[0].stride = 1;
-
sinclude(`matmul_asm_'rtype_code`.m4')dnl
if (GFC_DESCRIPTOR_RANK (retarray) == 1)
diff --git a/libgfortran/m4/matmull.m4 b/libgfortran/m4/matmull.m4
index 5acb4cb06cd..f880199eb1a 100644
--- a/libgfortran/m4/matmull.m4
+++ b/libgfortran/m4/matmull.m4
@@ -1,5 +1,5 @@
`/* Implementation of the MATMUL 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).
@@ -113,13 +113,6 @@ matmul_`'rtype_code (rtype * const restrict retarray,
}
dest = retarray->data;
- if (retarray->dim[0].stride == 0)
- retarray->dim[0].stride = 1;
- if (a->dim[0].stride == 0)
- a->dim[0].stride = 1;
- if (b->dim[0].stride == 0)
- b->dim[0].stride = 1;
-
sinclude(`matmul_asm_'rtype_code`.m4')dnl
if (GFC_DESCRIPTOR_RANK (retarray) == 1)
diff --git a/libgfortran/m4/reshape.m4 b/libgfortran/m4/reshape.m4
index 5b652b64c58..569b413028c 100644
--- a/libgfortran/m4/reshape.m4
+++ b/libgfortran/m4/reshape.m4
@@ -1,5 +1,5 @@
`/* Implementation of the RESHAPE
- 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).
@@ -86,15 +86,6 @@ reshape_`'rtype_ccode (rtype * const restrict ret,
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;
@@ -114,8 +105,6 @@ reshape_`'rtype_ccode (rtype * const restrict ret,
else
{
rdim = GFC_DESCRIPTOR_RANK (ret);
- if (ret->dim[0].stride == 0)
- ret->dim[0].stride = 1;
}
rsize = 1;
diff --git a/libgfortran/m4/shape.m4 b/libgfortran/m4/shape.m4
index e46c3dd7f91..a219a8bb32a 100644
--- a/libgfortran/m4/shape.m4
+++ b/libgfortran/m4/shape.m4
@@ -1,5 +1,5 @@
`/* Implementation of the SHAPE 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).
@@ -48,8 +48,6 @@ shape_`'rtype_kind (rtype * const restrict ret,
index_type stride;
stride = ret->dim[0].stride;
- if (stride == 0)
- stride = 1;
for (n = 0; n < GFC_DESCRIPTOR_RANK (array); n++)
{
diff --git a/libgfortran/m4/transpose.m4 b/libgfortran/m4/transpose.m4
index 98926607f99..1511258a1de 100644
--- a/libgfortran/m4/transpose.m4
+++ b/libgfortran/m4/transpose.m4
@@ -1,5 +1,5 @@
`/* Implementation of the TRANSPOSE intrinsic
- Copyright 2003, 2005 Free Software Foundation, Inc.
+ Copyright 2003, 2005, 2006 Free Software Foundation, Inc.
Contributed by Tobias Schlüter
This file is part of the GNU Fortran 95 runtime library (libgfortran).
@@ -72,11 +72,6 @@ transpose_`'rtype_code (rtype * const restrict ret,
ret->offset = 0;
}
- if (ret->dim[0].stride == 0)
- ret->dim[0].stride = 1;
- if (source->dim[0].stride == 0)
- source->dim[0].stride = 1;
-
sxstride = source->dim[0].stride;
systride = source->dim[1].stride;
xcount = source->dim[0].ubound + 1 - source->dim[0].lbound;