From 6ff24d45dc7bf2691b6c2c3f9e9830360dc572a6 Mon Sep 17 00:00:00 2001
From: Janne Blomqvist <jb@gcc.gnu.org>
Date: Tue, 6 Jun 2006 11:10:09 +0300
Subject: [PATCH] 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
---
 libgfortran/ChangeLog                      | 21 +++++++++++++++++++++
 libgfortran/generated/all_l16.c            |  8 --------
 libgfortran/generated/all_l4.c             |  8 --------
 libgfortran/generated/all_l8.c             |  8 --------
 libgfortran/generated/any_l16.c            |  8 --------
 libgfortran/generated/any_l4.c             |  8 --------
 libgfortran/generated/any_l8.c             |  8 --------
 libgfortran/generated/count_16_l16.c       |  8 --------
 libgfortran/generated/count_16_l4.c        |  8 --------
 libgfortran/generated/count_16_l8.c        |  8 --------
 libgfortran/generated/count_4_l16.c        |  8 --------
 libgfortran/generated/count_4_l4.c         |  8 --------
 libgfortran/generated/count_4_l8.c         |  8 --------
 libgfortran/generated/count_8_l16.c        |  8 --------
 libgfortran/generated/count_8_l4.c         |  8 --------
 libgfortran/generated/count_8_l8.c         |  8 --------
 libgfortran/generated/in_pack_c10.c        |  9 +++------
 libgfortran/generated/in_pack_c16.c        |  9 +++------
 libgfortran/generated/in_pack_c4.c         |  9 +++------
 libgfortran/generated/in_pack_c8.c         |  9 +++------
 libgfortran/generated/in_pack_i16.c        |  9 +++------
 libgfortran/generated/in_pack_i4.c         |  9 +++------
 libgfortran/generated/in_pack_i8.c         |  9 +++------
 libgfortran/generated/in_unpack_c10.c      |  5 +----
 libgfortran/generated/in_unpack_c16.c      |  5 +----
 libgfortran/generated/in_unpack_c4.c       |  5 +----
 libgfortran/generated/in_unpack_c8.c       |  5 +----
 libgfortran/generated/in_unpack_i16.c      |  5 +----
 libgfortran/generated/in_unpack_i4.c       |  5 +----
 libgfortran/generated/in_unpack_i8.c       |  5 +----
 libgfortran/generated/matmul_c10.c         | 11 +----------
 libgfortran/generated/matmul_c16.c         | 11 +----------
 libgfortran/generated/matmul_c4.c          | 11 +----------
 libgfortran/generated/matmul_c8.c          | 11 +----------
 libgfortran/generated/matmul_i16.c         | 11 +----------
 libgfortran/generated/matmul_i4.c          | 11 +----------
 libgfortran/generated/matmul_i8.c          | 11 +----------
 libgfortran/generated/matmul_l16.c         |  9 +--------
 libgfortran/generated/matmul_l4.c          |  9 +--------
 libgfortran/generated/matmul_l8.c          |  9 +--------
 libgfortran/generated/matmul_r10.c         | 11 +----------
 libgfortran/generated/matmul_r16.c         | 11 +----------
 libgfortran/generated/matmul_r4.c          | 11 +----------
 libgfortran/generated/matmul_r8.c          | 11 +----------
 libgfortran/generated/maxloc0_16_i16.c     | 22 ----------------------
 libgfortran/generated/maxloc0_16_i4.c      | 22 ----------------------
 libgfortran/generated/maxloc0_16_i8.c      | 22 ----------------------
 libgfortran/generated/maxloc0_16_r10.c     | 22 ----------------------
 libgfortran/generated/maxloc0_16_r16.c     | 22 ----------------------
 libgfortran/generated/maxloc0_16_r4.c      | 22 ----------------------
 libgfortran/generated/maxloc0_16_r8.c      | 22 ----------------------
 libgfortran/generated/maxloc0_4_i16.c      | 22 ----------------------
 libgfortran/generated/maxloc0_4_i4.c       | 22 ----------------------
 libgfortran/generated/maxloc0_4_i8.c       | 22 ----------------------
 libgfortran/generated/maxloc0_4_r10.c      | 22 ----------------------
 libgfortran/generated/maxloc0_4_r16.c      | 22 ----------------------
 libgfortran/generated/maxloc0_4_r4.c       | 22 ----------------------
 libgfortran/generated/maxloc0_4_r8.c       | 22 ----------------------
 libgfortran/generated/maxloc0_8_i16.c      | 22 ----------------------
 libgfortran/generated/maxloc0_8_i4.c       | 22 ----------------------
 libgfortran/generated/maxloc0_8_i8.c       | 22 ----------------------
 libgfortran/generated/maxloc0_8_r10.c      | 22 ----------------------
 libgfortran/generated/maxloc0_8_r16.c      | 22 ----------------------
 libgfortran/generated/maxloc0_8_r4.c       | 22 ----------------------
 libgfortran/generated/maxloc0_8_r8.c       | 22 ----------------------
 libgfortran/generated/maxloc1_16_i16.c     | 22 ----------------------
 libgfortran/generated/maxloc1_16_i4.c      | 22 ----------------------
 libgfortran/generated/maxloc1_16_i8.c      | 22 ----------------------
 libgfortran/generated/maxloc1_16_r10.c     | 22 ----------------------
 libgfortran/generated/maxloc1_16_r16.c     | 22 ----------------------
 libgfortran/generated/maxloc1_16_r4.c      | 22 ----------------------
 libgfortran/generated/maxloc1_16_r8.c      | 22 ----------------------
 libgfortran/generated/maxloc1_4_i16.c      | 22 ----------------------
 libgfortran/generated/maxloc1_4_i4.c       | 22 ----------------------
 libgfortran/generated/maxloc1_4_i8.c       | 22 ----------------------
 libgfortran/generated/maxloc1_4_r10.c      | 22 ----------------------
 libgfortran/generated/maxloc1_4_r16.c      | 22 ----------------------
 libgfortran/generated/maxloc1_4_r4.c       | 22 ----------------------
 libgfortran/generated/maxloc1_4_r8.c       | 22 ----------------------
 libgfortran/generated/maxloc1_8_i16.c      | 22 ----------------------
 libgfortran/generated/maxloc1_8_i4.c       | 22 ----------------------
 libgfortran/generated/maxloc1_8_i8.c       | 22 ----------------------
 libgfortran/generated/maxloc1_8_r10.c      | 22 ----------------------
 libgfortran/generated/maxloc1_8_r16.c      | 22 ----------------------
 libgfortran/generated/maxloc1_8_r4.c       | 22 ----------------------
 libgfortran/generated/maxloc1_8_r8.c       | 22 ----------------------
 libgfortran/generated/maxval_i16.c         | 22 ----------------------
 libgfortran/generated/maxval_i4.c          | 22 ----------------------
 libgfortran/generated/maxval_i8.c          | 22 ----------------------
 libgfortran/generated/maxval_r10.c         | 22 ----------------------
 libgfortran/generated/maxval_r16.c         | 22 ----------------------
 libgfortran/generated/maxval_r4.c          | 22 ----------------------
 libgfortran/generated/maxval_r8.c          | 22 ----------------------
 libgfortran/generated/minloc0_16_i16.c     | 22 ----------------------
 libgfortran/generated/minloc0_16_i4.c      | 22 ----------------------
 libgfortran/generated/minloc0_16_i8.c      | 22 ----------------------
 libgfortran/generated/minloc0_16_r10.c     | 22 ----------------------
 libgfortran/generated/minloc0_16_r16.c     | 22 ----------------------
 libgfortran/generated/minloc0_16_r4.c      | 22 ----------------------
 libgfortran/generated/minloc0_16_r8.c      | 22 ----------------------
 libgfortran/generated/minloc0_4_i16.c      | 22 ----------------------
 libgfortran/generated/minloc0_4_i4.c       | 22 ----------------------
 libgfortran/generated/minloc0_4_i8.c       | 22 ----------------------
 libgfortran/generated/minloc0_4_r10.c      | 22 ----------------------
 libgfortran/generated/minloc0_4_r16.c      | 22 ----------------------
 libgfortran/generated/minloc0_4_r4.c       | 22 ----------------------
 libgfortran/generated/minloc0_4_r8.c       | 22 ----------------------
 libgfortran/generated/minloc0_8_i16.c      | 22 ----------------------
 libgfortran/generated/minloc0_8_i4.c       | 22 ----------------------
 libgfortran/generated/minloc0_8_i8.c       | 22 ----------------------
 libgfortran/generated/minloc0_8_r10.c      | 22 ----------------------
 libgfortran/generated/minloc0_8_r16.c      | 22 ----------------------
 libgfortran/generated/minloc0_8_r4.c       | 22 ----------------------
 libgfortran/generated/minloc0_8_r8.c       | 22 ----------------------
 libgfortran/generated/minloc1_16_i16.c     | 22 ----------------------
 libgfortran/generated/minloc1_16_i4.c      | 22 ----------------------
 libgfortran/generated/minloc1_16_i8.c      | 22 ----------------------
 libgfortran/generated/minloc1_16_r10.c     | 22 ----------------------
 libgfortran/generated/minloc1_16_r16.c     | 22 ----------------------
 libgfortran/generated/minloc1_16_r4.c      | 22 ----------------------
 libgfortran/generated/minloc1_16_r8.c      | 22 ----------------------
 libgfortran/generated/minloc1_4_i16.c      | 22 ----------------------
 libgfortran/generated/minloc1_4_i4.c       | 22 ----------------------
 libgfortran/generated/minloc1_4_i8.c       | 22 ----------------------
 libgfortran/generated/minloc1_4_r10.c      | 22 ----------------------
 libgfortran/generated/minloc1_4_r16.c      | 22 ----------------------
 libgfortran/generated/minloc1_4_r4.c       | 22 ----------------------
 libgfortran/generated/minloc1_4_r8.c       | 22 ----------------------
 libgfortran/generated/minloc1_8_i16.c      | 22 ----------------------
 libgfortran/generated/minloc1_8_i4.c       | 22 ----------------------
 libgfortran/generated/minloc1_8_i8.c       | 22 ----------------------
 libgfortran/generated/minloc1_8_r10.c      | 22 ----------------------
 libgfortran/generated/minloc1_8_r16.c      | 22 ----------------------
 libgfortran/generated/minloc1_8_r4.c       | 22 ----------------------
 libgfortran/generated/minloc1_8_r8.c       | 22 ----------------------
 libgfortran/generated/minval_i16.c         | 22 ----------------------
 libgfortran/generated/minval_i4.c          | 22 ----------------------
 libgfortran/generated/minval_i8.c          | 22 ----------------------
 libgfortran/generated/minval_r10.c         | 22 ----------------------
 libgfortran/generated/minval_r16.c         | 22 ----------------------
 libgfortran/generated/minval_r4.c          | 22 ----------------------
 libgfortran/generated/minval_r8.c          | 22 ----------------------
 libgfortran/generated/product_c10.c        | 22 ----------------------
 libgfortran/generated/product_c16.c        | 22 ----------------------
 libgfortran/generated/product_c4.c         | 22 ----------------------
 libgfortran/generated/product_c8.c         | 22 ----------------------
 libgfortran/generated/product_i16.c        | 22 ----------------------
 libgfortran/generated/product_i4.c         | 22 ----------------------
 libgfortran/generated/product_i8.c         | 22 ----------------------
 libgfortran/generated/product_r10.c        | 22 ----------------------
 libgfortran/generated/product_r16.c        | 22 ----------------------
 libgfortran/generated/product_r4.c         | 22 ----------------------
 libgfortran/generated/product_r8.c         | 22 ----------------------
 libgfortran/generated/reshape_c10.c        | 13 +------------
 libgfortran/generated/reshape_c16.c        | 13 +------------
 libgfortran/generated/reshape_c4.c         | 13 +------------
 libgfortran/generated/reshape_c8.c         | 13 +------------
 libgfortran/generated/reshape_i16.c        | 13 +------------
 libgfortran/generated/reshape_i4.c         | 13 +------------
 libgfortran/generated/reshape_i8.c         | 13 +------------
 libgfortran/generated/reshape_r10.c        | 13 +------------
 libgfortran/generated/reshape_r16.c        | 13 +------------
 libgfortran/generated/shape_i16.c          |  4 +---
 libgfortran/generated/shape_i4.c           |  4 +---
 libgfortran/generated/shape_i8.c           |  4 +---
 libgfortran/generated/sum_c10.c            | 22 ----------------------
 libgfortran/generated/sum_c16.c            | 22 ----------------------
 libgfortran/generated/sum_c4.c             | 22 ----------------------
 libgfortran/generated/sum_c8.c             | 22 ----------------------
 libgfortran/generated/sum_i16.c            | 22 ----------------------
 libgfortran/generated/sum_i4.c             | 22 ----------------------
 libgfortran/generated/sum_i8.c             | 22 ----------------------
 libgfortran/generated/sum_r10.c            | 22 ----------------------
 libgfortran/generated/sum_r16.c            | 22 ----------------------
 libgfortran/generated/sum_r4.c             | 22 ----------------------
 libgfortran/generated/sum_r8.c             | 22 ----------------------
 libgfortran/generated/transpose_c10.c      |  7 +------
 libgfortran/generated/transpose_c16.c      |  7 +------
 libgfortran/generated/transpose_c4.c       |  7 +------
 libgfortran/generated/transpose_c8.c       |  7 +------
 libgfortran/generated/transpose_i16.c      |  7 +------
 libgfortran/generated/transpose_i4.c       |  7 +------
 libgfortran/generated/transpose_i8.c       |  7 +------
 libgfortran/generated/transpose_r10.c      |  7 +------
 libgfortran/generated/transpose_r16.c      |  7 +------
 libgfortran/intrinsics/etime.c             |  5 +----
 libgfortran/intrinsics/random.c            | 14 +-------------
 libgfortran/intrinsics/reshape_generic.c   | 13 +------------
 libgfortran/intrinsics/spread_generic.c    |  8 +-------
 libgfortran/intrinsics/stat.c              | 14 +-------------
 libgfortran/intrinsics/transpose_generic.c |  6 +-----
 libgfortran/m4/iforeach.m4                 | 22 ----------------------
 libgfortran/m4/ifunction.m4                | 22 ----------------------
 libgfortran/m4/in_pack.m4                  |  9 +++------
 libgfortran/m4/in_unpack.m4                |  5 +----
 libgfortran/m4/matmul.m4                   | 11 +----------
 libgfortran/m4/matmull.m4                  |  9 +--------
 libgfortran/m4/reshape.m4                  | 13 +------------
 libgfortran/m4/shape.m4                    |  4 +---
 libgfortran/m4/transpose.m4                |  7 +------
 200 files changed, 99 insertions(+), 3282 deletions(-)

diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 227f61b2b556..bd1aecbc32bd 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,24 @@
+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.
+	
 2006-05-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
 	PR libgfortran/27757
diff --git a/libgfortran/generated/all_l16.c b/libgfortran/generated/all_l16.c
index 78df909369b5..91f342aee1d0 100644
--- a/libgfortran/generated/all_l16.c
+++ b/libgfortran/generated/all_l16.c
@@ -62,11 +62,6 @@ all_l16 (gfc_array_l16 * 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;
 
@@ -103,9 +98,6 @@ all_l16 (gfc_array_l16 * 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");
     }
diff --git a/libgfortran/generated/all_l4.c b/libgfortran/generated/all_l4.c
index 0a6f44de3814..7cb4ae1a6d7d 100644
--- a/libgfortran/generated/all_l4.c
+++ b/libgfortran/generated/all_l4.c
@@ -62,11 +62,6 @@ all_l4 (gfc_array_l4 * 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;
 
@@ -103,9 +98,6 @@ all_l4 (gfc_array_l4 * 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");
     }
diff --git a/libgfortran/generated/all_l8.c b/libgfortran/generated/all_l8.c
index 74a3731c5eee..bc3928a8fa79 100644
--- a/libgfortran/generated/all_l8.c
+++ b/libgfortran/generated/all_l8.c
@@ -62,11 +62,6 @@ all_l8 (gfc_array_l8 * 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;
 
@@ -103,9 +98,6 @@ all_l8 (gfc_array_l8 * 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");
     }
diff --git a/libgfortran/generated/any_l16.c b/libgfortran/generated/any_l16.c
index 114688084591..e4fce4b9f6e5 100644
--- a/libgfortran/generated/any_l16.c
+++ b/libgfortran/generated/any_l16.c
@@ -62,11 +62,6 @@ any_l16 (gfc_array_l16 * 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;
 
@@ -103,9 +98,6 @@ any_l16 (gfc_array_l16 * 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");
     }
diff --git a/libgfortran/generated/any_l4.c b/libgfortran/generated/any_l4.c
index 4a650f019a86..d026abd2b9b5 100644
--- a/libgfortran/generated/any_l4.c
+++ b/libgfortran/generated/any_l4.c
@@ -62,11 +62,6 @@ any_l4 (gfc_array_l4 * 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;
 
@@ -103,9 +98,6 @@ any_l4 (gfc_array_l4 * 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");
     }
diff --git a/libgfortran/generated/any_l8.c b/libgfortran/generated/any_l8.c
index ed45e790db21..232ebfadda56 100644
--- a/libgfortran/generated/any_l8.c
+++ b/libgfortran/generated/any_l8.c
@@ -62,11 +62,6 @@ any_l8 (gfc_array_l8 * 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;
 
@@ -103,9 +98,6 @@ any_l8 (gfc_array_l8 * 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");
     }
diff --git a/libgfortran/generated/count_16_l16.c b/libgfortran/generated/count_16_l16.c
index 5d27d652213f..c3402a0bc0f7 100644
--- a/libgfortran/generated/count_16_l16.c
+++ b/libgfortran/generated/count_16_l16.c
@@ -62,11 +62,6 @@ count_16_l16 (gfc_array_i16 * 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;
 
@@ -103,9 +98,6 @@ count_16_l16 (gfc_array_i16 * 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");
     }
diff --git a/libgfortran/generated/count_16_l4.c b/libgfortran/generated/count_16_l4.c
index b491e90e0445..433096dd3dc6 100644
--- a/libgfortran/generated/count_16_l4.c
+++ b/libgfortran/generated/count_16_l4.c
@@ -62,11 +62,6 @@ count_16_l4 (gfc_array_i16 * 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;
 
@@ -103,9 +98,6 @@ count_16_l4 (gfc_array_i16 * 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");
     }
diff --git a/libgfortran/generated/count_16_l8.c b/libgfortran/generated/count_16_l8.c
index 03ff91f32dd6..4a363dc08d09 100644
--- a/libgfortran/generated/count_16_l8.c
+++ b/libgfortran/generated/count_16_l8.c
@@ -62,11 +62,6 @@ count_16_l8 (gfc_array_i16 * 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;
 
@@ -103,9 +98,6 @@ count_16_l8 (gfc_array_i16 * 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");
     }
diff --git a/libgfortran/generated/count_4_l16.c b/libgfortran/generated/count_4_l16.c
index bad5d5e8a8e8..df29e33961e0 100644
--- a/libgfortran/generated/count_4_l16.c
+++ b/libgfortran/generated/count_4_l16.c
@@ -62,11 +62,6 @@ count_4_l16 (gfc_array_i4 * 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;
 
@@ -103,9 +98,6 @@ count_4_l16 (gfc_array_i4 * 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");
     }
diff --git a/libgfortran/generated/count_4_l4.c b/libgfortran/generated/count_4_l4.c
index 440a549b9541..fcbe0812f325 100644
--- a/libgfortran/generated/count_4_l4.c
+++ b/libgfortran/generated/count_4_l4.c
@@ -62,11 +62,6 @@ count_4_l4 (gfc_array_i4 * 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;
 
@@ -103,9 +98,6 @@ count_4_l4 (gfc_array_i4 * 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");
     }
diff --git a/libgfortran/generated/count_4_l8.c b/libgfortran/generated/count_4_l8.c
index 4992b7712063..2563e88ecd18 100644
--- a/libgfortran/generated/count_4_l8.c
+++ b/libgfortran/generated/count_4_l8.c
@@ -62,11 +62,6 @@ count_4_l8 (gfc_array_i4 * 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;
 
@@ -103,9 +98,6 @@ count_4_l8 (gfc_array_i4 * 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");
     }
diff --git a/libgfortran/generated/count_8_l16.c b/libgfortran/generated/count_8_l16.c
index ec2367729827..3b8172d7f851 100644
--- a/libgfortran/generated/count_8_l16.c
+++ b/libgfortran/generated/count_8_l16.c
@@ -62,11 +62,6 @@ count_8_l16 (gfc_array_i8 * 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;
 
@@ -103,9 +98,6 @@ count_8_l16 (gfc_array_i8 * 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");
     }
diff --git a/libgfortran/generated/count_8_l4.c b/libgfortran/generated/count_8_l4.c
index 97ae10e97fb9..a322b1b19133 100644
--- a/libgfortran/generated/count_8_l4.c
+++ b/libgfortran/generated/count_8_l4.c
@@ -62,11 +62,6 @@ count_8_l4 (gfc_array_i8 * 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;
 
@@ -103,9 +98,6 @@ count_8_l4 (gfc_array_i8 * 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");
     }
diff --git a/libgfortran/generated/count_8_l8.c b/libgfortran/generated/count_8_l8.c
index b2d06b968736..48a60b15e09a 100644
--- a/libgfortran/generated/count_8_l8.c
+++ b/libgfortran/generated/count_8_l8.c
@@ -62,11 +62,6 @@ count_8_l8 (gfc_array_i8 * 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;
 
@@ -103,9 +98,6 @@ count_8_l8 (gfc_array_i8 * 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");
     }
diff --git a/libgfortran/generated/in_pack_c10.c b/libgfortran/generated/in_pack_c10.c
index 5a91d9765bc0..1c51349d088a 100644
--- a/libgfortran/generated/in_pack_c10.c
+++ b/libgfortran/generated/in_pack_c10.c
@@ -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).
@@ -53,11 +53,8 @@ internal_pack_c10 (gfc_array_c10 * source)
   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/generated/in_pack_c16.c b/libgfortran/generated/in_pack_c16.c
index d52249b648f5..ca6af477ef9f 100644
--- a/libgfortran/generated/in_pack_c16.c
+++ b/libgfortran/generated/in_pack_c16.c
@@ -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).
@@ -53,11 +53,8 @@ internal_pack_c16 (gfc_array_c16 * source)
   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/generated/in_pack_c4.c b/libgfortran/generated/in_pack_c4.c
index a4fd70909d59..f16392b3ca9f 100644
--- a/libgfortran/generated/in_pack_c4.c
+++ b/libgfortran/generated/in_pack_c4.c
@@ -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).
@@ -53,11 +53,8 @@ internal_pack_c4 (gfc_array_c4 * source)
   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/generated/in_pack_c8.c b/libgfortran/generated/in_pack_c8.c
index a3c6214026ef..abcf571dbd89 100644
--- a/libgfortran/generated/in_pack_c8.c
+++ b/libgfortran/generated/in_pack_c8.c
@@ -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).
@@ -53,11 +53,8 @@ internal_pack_c8 (gfc_array_c8 * source)
   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/generated/in_pack_i16.c b/libgfortran/generated/in_pack_i16.c
index b8c6c29d6f7c..205c1020150e 100644
--- a/libgfortran/generated/in_pack_i16.c
+++ b/libgfortran/generated/in_pack_i16.c
@@ -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).
@@ -53,11 +53,8 @@ internal_pack_16 (gfc_array_i16 * source)
   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/generated/in_pack_i4.c b/libgfortran/generated/in_pack_i4.c
index 4452c644d715..0d2ef2dd2615 100644
--- a/libgfortran/generated/in_pack_i4.c
+++ b/libgfortran/generated/in_pack_i4.c
@@ -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).
@@ -53,11 +53,8 @@ internal_pack_4 (gfc_array_i4 * source)
   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/generated/in_pack_i8.c b/libgfortran/generated/in_pack_i8.c
index 35e48422897b..b9be8b335820 100644
--- a/libgfortran/generated/in_pack_i8.c
+++ b/libgfortran/generated/in_pack_i8.c
@@ -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).
@@ -53,11 +53,8 @@ internal_pack_8 (gfc_array_i8 * source)
   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/generated/in_unpack_c10.c b/libgfortran/generated/in_unpack_c10.c
index d7983f96ce65..d4fe858b5c53 100644
--- a/libgfortran/generated/in_unpack_c10.c
+++ b/libgfortran/generated/in_unpack_c10.c
@@ -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).
@@ -52,9 +52,6 @@ internal_unpack_c10 (gfc_array_c10 * d, const GFC_COMPLEX_10 * src)
   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/generated/in_unpack_c16.c b/libgfortran/generated/in_unpack_c16.c
index 9f1baf279113..ad5fa0717cc1 100644
--- a/libgfortran/generated/in_unpack_c16.c
+++ b/libgfortran/generated/in_unpack_c16.c
@@ -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).
@@ -52,9 +52,6 @@ internal_unpack_c16 (gfc_array_c16 * d, const GFC_COMPLEX_16 * src)
   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/generated/in_unpack_c4.c b/libgfortran/generated/in_unpack_c4.c
index 965b53a9c70e..de1b48664ba6 100644
--- a/libgfortran/generated/in_unpack_c4.c
+++ b/libgfortran/generated/in_unpack_c4.c
@@ -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).
@@ -52,9 +52,6 @@ internal_unpack_c4 (gfc_array_c4 * d, const GFC_COMPLEX_4 * src)
   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/generated/in_unpack_c8.c b/libgfortran/generated/in_unpack_c8.c
index b5d747a7a99b..70f22e41c290 100644
--- a/libgfortran/generated/in_unpack_c8.c
+++ b/libgfortran/generated/in_unpack_c8.c
@@ -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).
@@ -52,9 +52,6 @@ internal_unpack_c8 (gfc_array_c8 * d, const GFC_COMPLEX_8 * src)
   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/generated/in_unpack_i16.c b/libgfortran/generated/in_unpack_i16.c
index 680b5dd2b59b..b64b8bdaf655 100644
--- a/libgfortran/generated/in_unpack_i16.c
+++ b/libgfortran/generated/in_unpack_i16.c
@@ -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).
@@ -52,9 +52,6 @@ internal_unpack_16 (gfc_array_i16 * d, const GFC_INTEGER_16 * src)
   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/generated/in_unpack_i4.c b/libgfortran/generated/in_unpack_i4.c
index 6cf7bd2f2730..013634921036 100644
--- a/libgfortran/generated/in_unpack_i4.c
+++ b/libgfortran/generated/in_unpack_i4.c
@@ -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).
@@ -52,9 +52,6 @@ internal_unpack_4 (gfc_array_i4 * d, const GFC_INTEGER_4 * src)
   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/generated/in_unpack_i8.c b/libgfortran/generated/in_unpack_i8.c
index 1d4f0e459ab8..3f21843c7eb5 100644
--- a/libgfortran/generated/in_unpack_i8.c
+++ b/libgfortran/generated/in_unpack_i8.c
@@ -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).
@@ -52,9 +52,6 @@ internal_unpack_8 (gfc_array_i8 * d, const GFC_INTEGER_8 * src)
   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/generated/matmul_c10.c b/libgfortran/generated/matmul_c10.c
index 93032f814047..72c3a7dba725 100644
--- a/libgfortran/generated/matmul_c10.c
+++ b/libgfortran/generated/matmul_c10.c
@@ -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).
@@ -120,15 +120,6 @@ matmul_c10 (gfc_array_c10 * 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;
-
 
   if (GFC_DESCRIPTOR_RANK (retarray) == 1)
     {
diff --git a/libgfortran/generated/matmul_c16.c b/libgfortran/generated/matmul_c16.c
index 03ad0f7df27d..d87eea1a273b 100644
--- a/libgfortran/generated/matmul_c16.c
+++ b/libgfortran/generated/matmul_c16.c
@@ -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).
@@ -120,15 +120,6 @@ matmul_c16 (gfc_array_c16 * 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;
-
 
   if (GFC_DESCRIPTOR_RANK (retarray) == 1)
     {
diff --git a/libgfortran/generated/matmul_c4.c b/libgfortran/generated/matmul_c4.c
index 84c94cd586fd..339c9c03554e 100644
--- a/libgfortran/generated/matmul_c4.c
+++ b/libgfortran/generated/matmul_c4.c
@@ -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).
@@ -120,15 +120,6 @@ matmul_c4 (gfc_array_c4 * 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;
-
 
   if (GFC_DESCRIPTOR_RANK (retarray) == 1)
     {
diff --git a/libgfortran/generated/matmul_c8.c b/libgfortran/generated/matmul_c8.c
index f491ea058d7d..13a9e3720d3d 100644
--- a/libgfortran/generated/matmul_c8.c
+++ b/libgfortran/generated/matmul_c8.c
@@ -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).
@@ -120,15 +120,6 @@ matmul_c8 (gfc_array_c8 * 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;
-
 
   if (GFC_DESCRIPTOR_RANK (retarray) == 1)
     {
diff --git a/libgfortran/generated/matmul_i16.c b/libgfortran/generated/matmul_i16.c
index 50d87bb8b0fc..b6136ef702c6 100644
--- a/libgfortran/generated/matmul_i16.c
+++ b/libgfortran/generated/matmul_i16.c
@@ -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).
@@ -120,15 +120,6 @@ matmul_i16 (gfc_array_i16 * 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;
-
 
   if (GFC_DESCRIPTOR_RANK (retarray) == 1)
     {
diff --git a/libgfortran/generated/matmul_i4.c b/libgfortran/generated/matmul_i4.c
index 12ac630a5491..4cffcf05dd8a 100644
--- a/libgfortran/generated/matmul_i4.c
+++ b/libgfortran/generated/matmul_i4.c
@@ -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).
@@ -120,15 +120,6 @@ matmul_i4 (gfc_array_i4 * 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;
-
 
   if (GFC_DESCRIPTOR_RANK (retarray) == 1)
     {
diff --git a/libgfortran/generated/matmul_i8.c b/libgfortran/generated/matmul_i8.c
index 82b22292632e..c4fb0c7e5b9a 100644
--- a/libgfortran/generated/matmul_i8.c
+++ b/libgfortran/generated/matmul_i8.c
@@ -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).
@@ -120,15 +120,6 @@ matmul_i8 (gfc_array_i8 * 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;
-
 
   if (GFC_DESCRIPTOR_RANK (retarray) == 1)
     {
diff --git a/libgfortran/generated/matmul_l16.c b/libgfortran/generated/matmul_l16.c
index caa1b11910e0..7e7f2f9c6580 100644
--- a/libgfortran/generated/matmul_l16.c
+++ b/libgfortran/generated/matmul_l16.c
@@ -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).
@@ -112,13 +112,6 @@ matmul_l16 (gfc_array_l16 * 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;
-
 
   if (GFC_DESCRIPTOR_RANK (retarray) == 1)
     {
diff --git a/libgfortran/generated/matmul_l4.c b/libgfortran/generated/matmul_l4.c
index 9a89113bbc62..8428ff9dc0ba 100644
--- a/libgfortran/generated/matmul_l4.c
+++ b/libgfortran/generated/matmul_l4.c
@@ -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).
@@ -112,13 +112,6 @@ matmul_l4 (gfc_array_l4 * 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;
-
 
   if (GFC_DESCRIPTOR_RANK (retarray) == 1)
     {
diff --git a/libgfortran/generated/matmul_l8.c b/libgfortran/generated/matmul_l8.c
index bd01f1642d34..76dee0a48d7f 100644
--- a/libgfortran/generated/matmul_l8.c
+++ b/libgfortran/generated/matmul_l8.c
@@ -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).
@@ -112,13 +112,6 @@ matmul_l8 (gfc_array_l8 * 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;
-
 
   if (GFC_DESCRIPTOR_RANK (retarray) == 1)
     {
diff --git a/libgfortran/generated/matmul_r10.c b/libgfortran/generated/matmul_r10.c
index 73e1e3276308..e90ac57c5c2b 100644
--- a/libgfortran/generated/matmul_r10.c
+++ b/libgfortran/generated/matmul_r10.c
@@ -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).
@@ -120,15 +120,6 @@ matmul_r10 (gfc_array_r10 * 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;
-
 
   if (GFC_DESCRIPTOR_RANK (retarray) == 1)
     {
diff --git a/libgfortran/generated/matmul_r16.c b/libgfortran/generated/matmul_r16.c
index 099c6bf855ed..3823fa6d5c49 100644
--- a/libgfortran/generated/matmul_r16.c
+++ b/libgfortran/generated/matmul_r16.c
@@ -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).
@@ -120,15 +120,6 @@ matmul_r16 (gfc_array_r16 * 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;
-
 
   if (GFC_DESCRIPTOR_RANK (retarray) == 1)
     {
diff --git a/libgfortran/generated/matmul_r4.c b/libgfortran/generated/matmul_r4.c
index ca6a4a4360ca..3757b65eaffd 100644
--- a/libgfortran/generated/matmul_r4.c
+++ b/libgfortran/generated/matmul_r4.c
@@ -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).
@@ -120,15 +120,6 @@ matmul_r4 (gfc_array_r4 * 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;
-
 
   if (GFC_DESCRIPTOR_RANK (retarray) == 1)
     {
diff --git a/libgfortran/generated/matmul_r8.c b/libgfortran/generated/matmul_r8.c
index 1844cdc3da8a..2bd607cc40ab 100644
--- a/libgfortran/generated/matmul_r8.c
+++ b/libgfortran/generated/matmul_r8.c
@@ -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).
@@ -120,15 +120,6 @@ matmul_r8 (gfc_array_r8 * 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;
-
 
   if (GFC_DESCRIPTOR_RANK (retarray) == 1)
     {
diff --git a/libgfortran/generated/maxloc0_16_i16.c b/libgfortran/generated/maxloc0_16_i16.c
index ab341d8bea9e..1883557545c2 100644
--- a/libgfortran/generated/maxloc0_16_i16.c
+++ b/libgfortran/generated/maxloc0_16_i16.c
@@ -76,16 +76,8 @@ maxloc0_16_i16 (gfc_array_i16 * 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++)
@@ -196,19 +188,8 @@ mmaxloc0_16_i16 (gfc_array_i16 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ smaxloc0_16_i16 (gfc_array_i16 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc0_16_i4.c b/libgfortran/generated/maxloc0_16_i4.c
index 51bee3154f66..187a6c8c6944 100644
--- a/libgfortran/generated/maxloc0_16_i4.c
+++ b/libgfortran/generated/maxloc0_16_i4.c
@@ -76,16 +76,8 @@ maxloc0_16_i4 (gfc_array_i16 * 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++)
@@ -196,19 +188,8 @@ mmaxloc0_16_i4 (gfc_array_i16 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ smaxloc0_16_i4 (gfc_array_i16 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc0_16_i8.c b/libgfortran/generated/maxloc0_16_i8.c
index dd8fb46a83ac..c51a70b9228f 100644
--- a/libgfortran/generated/maxloc0_16_i8.c
+++ b/libgfortran/generated/maxloc0_16_i8.c
@@ -76,16 +76,8 @@ maxloc0_16_i8 (gfc_array_i16 * 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++)
@@ -196,19 +188,8 @@ mmaxloc0_16_i8 (gfc_array_i16 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ smaxloc0_16_i8 (gfc_array_i16 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc0_16_r10.c b/libgfortran/generated/maxloc0_16_r10.c
index 793885da8d71..75c3f7a86f33 100644
--- a/libgfortran/generated/maxloc0_16_r10.c
+++ b/libgfortran/generated/maxloc0_16_r10.c
@@ -76,16 +76,8 @@ maxloc0_16_r10 (gfc_array_i16 * 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++)
@@ -196,19 +188,8 @@ mmaxloc0_16_r10 (gfc_array_i16 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ smaxloc0_16_r10 (gfc_array_i16 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc0_16_r16.c b/libgfortran/generated/maxloc0_16_r16.c
index e3d0c7ff9c15..4754bbd487dd 100644
--- a/libgfortran/generated/maxloc0_16_r16.c
+++ b/libgfortran/generated/maxloc0_16_r16.c
@@ -76,16 +76,8 @@ maxloc0_16_r16 (gfc_array_i16 * 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++)
@@ -196,19 +188,8 @@ mmaxloc0_16_r16 (gfc_array_i16 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ smaxloc0_16_r16 (gfc_array_i16 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc0_16_r4.c b/libgfortran/generated/maxloc0_16_r4.c
index eedeaffda524..007932e18386 100644
--- a/libgfortran/generated/maxloc0_16_r4.c
+++ b/libgfortran/generated/maxloc0_16_r4.c
@@ -76,16 +76,8 @@ maxloc0_16_r4 (gfc_array_i16 * 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++)
@@ -196,19 +188,8 @@ mmaxloc0_16_r4 (gfc_array_i16 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ smaxloc0_16_r4 (gfc_array_i16 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc0_16_r8.c b/libgfortran/generated/maxloc0_16_r8.c
index 0e93c2a4d8e1..6c004b02cad7 100644
--- a/libgfortran/generated/maxloc0_16_r8.c
+++ b/libgfortran/generated/maxloc0_16_r8.c
@@ -76,16 +76,8 @@ maxloc0_16_r8 (gfc_array_i16 * 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++)
@@ -196,19 +188,8 @@ mmaxloc0_16_r8 (gfc_array_i16 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ smaxloc0_16_r8 (gfc_array_i16 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc0_4_i16.c b/libgfortran/generated/maxloc0_4_i16.c
index 01d787019640..a8b3bab824e3 100644
--- a/libgfortran/generated/maxloc0_4_i16.c
+++ b/libgfortran/generated/maxloc0_4_i16.c
@@ -76,16 +76,8 @@ maxloc0_4_i16 (gfc_array_i4 * 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++)
@@ -196,19 +188,8 @@ mmaxloc0_4_i16 (gfc_array_i4 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ smaxloc0_4_i16 (gfc_array_i4 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc0_4_i4.c b/libgfortran/generated/maxloc0_4_i4.c
index 7b1260c7e969..8fe240c9a7e1 100644
--- a/libgfortran/generated/maxloc0_4_i4.c
+++ b/libgfortran/generated/maxloc0_4_i4.c
@@ -76,16 +76,8 @@ maxloc0_4_i4 (gfc_array_i4 * 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++)
@@ -196,19 +188,8 @@ mmaxloc0_4_i4 (gfc_array_i4 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ smaxloc0_4_i4 (gfc_array_i4 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc0_4_i8.c b/libgfortran/generated/maxloc0_4_i8.c
index 18b81c6a6527..dd816defcd8e 100644
--- a/libgfortran/generated/maxloc0_4_i8.c
+++ b/libgfortran/generated/maxloc0_4_i8.c
@@ -76,16 +76,8 @@ maxloc0_4_i8 (gfc_array_i4 * 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++)
@@ -196,19 +188,8 @@ mmaxloc0_4_i8 (gfc_array_i4 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ smaxloc0_4_i8 (gfc_array_i4 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc0_4_r10.c b/libgfortran/generated/maxloc0_4_r10.c
index 59e521c24211..db829a90218c 100644
--- a/libgfortran/generated/maxloc0_4_r10.c
+++ b/libgfortran/generated/maxloc0_4_r10.c
@@ -76,16 +76,8 @@ maxloc0_4_r10 (gfc_array_i4 * 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++)
@@ -196,19 +188,8 @@ mmaxloc0_4_r10 (gfc_array_i4 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ smaxloc0_4_r10 (gfc_array_i4 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc0_4_r16.c b/libgfortran/generated/maxloc0_4_r16.c
index 18bf738889f1..de37c032a60f 100644
--- a/libgfortran/generated/maxloc0_4_r16.c
+++ b/libgfortran/generated/maxloc0_4_r16.c
@@ -76,16 +76,8 @@ maxloc0_4_r16 (gfc_array_i4 * 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++)
@@ -196,19 +188,8 @@ mmaxloc0_4_r16 (gfc_array_i4 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ smaxloc0_4_r16 (gfc_array_i4 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc0_4_r4.c b/libgfortran/generated/maxloc0_4_r4.c
index daa379c72d3b..b69c01fabc08 100644
--- a/libgfortran/generated/maxloc0_4_r4.c
+++ b/libgfortran/generated/maxloc0_4_r4.c
@@ -76,16 +76,8 @@ maxloc0_4_r4 (gfc_array_i4 * 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++)
@@ -196,19 +188,8 @@ mmaxloc0_4_r4 (gfc_array_i4 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ smaxloc0_4_r4 (gfc_array_i4 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc0_4_r8.c b/libgfortran/generated/maxloc0_4_r8.c
index 063fed03fac9..8021d1b92887 100644
--- a/libgfortran/generated/maxloc0_4_r8.c
+++ b/libgfortran/generated/maxloc0_4_r8.c
@@ -76,16 +76,8 @@ maxloc0_4_r8 (gfc_array_i4 * 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++)
@@ -196,19 +188,8 @@ mmaxloc0_4_r8 (gfc_array_i4 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ smaxloc0_4_r8 (gfc_array_i4 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc0_8_i16.c b/libgfortran/generated/maxloc0_8_i16.c
index 1e1dbf250492..14ce14226358 100644
--- a/libgfortran/generated/maxloc0_8_i16.c
+++ b/libgfortran/generated/maxloc0_8_i16.c
@@ -76,16 +76,8 @@ maxloc0_8_i16 (gfc_array_i8 * 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++)
@@ -196,19 +188,8 @@ mmaxloc0_8_i16 (gfc_array_i8 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ smaxloc0_8_i16 (gfc_array_i8 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc0_8_i4.c b/libgfortran/generated/maxloc0_8_i4.c
index 2a08cd82de43..df1a27fd16d2 100644
--- a/libgfortran/generated/maxloc0_8_i4.c
+++ b/libgfortran/generated/maxloc0_8_i4.c
@@ -76,16 +76,8 @@ maxloc0_8_i4 (gfc_array_i8 * 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++)
@@ -196,19 +188,8 @@ mmaxloc0_8_i4 (gfc_array_i8 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ smaxloc0_8_i4 (gfc_array_i8 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc0_8_i8.c b/libgfortran/generated/maxloc0_8_i8.c
index b17a445e96fd..3400587250f4 100644
--- a/libgfortran/generated/maxloc0_8_i8.c
+++ b/libgfortran/generated/maxloc0_8_i8.c
@@ -76,16 +76,8 @@ maxloc0_8_i8 (gfc_array_i8 * 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++)
@@ -196,19 +188,8 @@ mmaxloc0_8_i8 (gfc_array_i8 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ smaxloc0_8_i8 (gfc_array_i8 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc0_8_r10.c b/libgfortran/generated/maxloc0_8_r10.c
index 63c1467c54a9..70860c8a9bdf 100644
--- a/libgfortran/generated/maxloc0_8_r10.c
+++ b/libgfortran/generated/maxloc0_8_r10.c
@@ -76,16 +76,8 @@ maxloc0_8_r10 (gfc_array_i8 * 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++)
@@ -196,19 +188,8 @@ mmaxloc0_8_r10 (gfc_array_i8 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ smaxloc0_8_r10 (gfc_array_i8 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc0_8_r16.c b/libgfortran/generated/maxloc0_8_r16.c
index c1fe42a71b8e..e9ef7ef40605 100644
--- a/libgfortran/generated/maxloc0_8_r16.c
+++ b/libgfortran/generated/maxloc0_8_r16.c
@@ -76,16 +76,8 @@ maxloc0_8_r16 (gfc_array_i8 * 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++)
@@ -196,19 +188,8 @@ mmaxloc0_8_r16 (gfc_array_i8 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ smaxloc0_8_r16 (gfc_array_i8 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc0_8_r4.c b/libgfortran/generated/maxloc0_8_r4.c
index 58de2ca0e46b..7dede4597e1a 100644
--- a/libgfortran/generated/maxloc0_8_r4.c
+++ b/libgfortran/generated/maxloc0_8_r4.c
@@ -76,16 +76,8 @@ maxloc0_8_r4 (gfc_array_i8 * 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++)
@@ -196,19 +188,8 @@ mmaxloc0_8_r4 (gfc_array_i8 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ smaxloc0_8_r4 (gfc_array_i8 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc0_8_r8.c b/libgfortran/generated/maxloc0_8_r8.c
index e286a8198974..73531d713f9c 100644
--- a/libgfortran/generated/maxloc0_8_r8.c
+++ b/libgfortran/generated/maxloc0_8_r8.c
@@ -76,16 +76,8 @@ maxloc0_8_r8 (gfc_array_i8 * 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++)
@@ -196,19 +188,8 @@ mmaxloc0_8_r8 (gfc_array_i8 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ smaxloc0_8_r8 (gfc_array_i8 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc1_16_i16.c b/libgfortran/generated/maxloc1_16_i16.c
index 9f6408b111c6..7ba4fa56360d 100644
--- a/libgfortran/generated/maxloc1_16_i16.c
+++ b/libgfortran/generated/maxloc1_16_i16.c
@@ -64,11 +64,6 @@ maxloc1_16_i16 (gfc_array_i16 * 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;
 
@@ -105,9 +100,6 @@ maxloc1_16_i16 (gfc_array_i16 * 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");
     }
@@ -210,14 +202,6 @@ mmaxloc1_16_i16 (gfc_array_i16 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mmaxloc1_16_i16 (gfc_array_i16 * 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");
     }
@@ -392,9 +373,6 @@ smaxloc1_16_i16 (gfc_array_i16 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc1_16_i4.c b/libgfortran/generated/maxloc1_16_i4.c
index 7810033dfd29..af438c7758a0 100644
--- a/libgfortran/generated/maxloc1_16_i4.c
+++ b/libgfortran/generated/maxloc1_16_i4.c
@@ -64,11 +64,6 @@ maxloc1_16_i4 (gfc_array_i16 * 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;
 
@@ -105,9 +100,6 @@ maxloc1_16_i4 (gfc_array_i16 * 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");
     }
@@ -210,14 +202,6 @@ mmaxloc1_16_i4 (gfc_array_i16 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mmaxloc1_16_i4 (gfc_array_i16 * 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");
     }
@@ -392,9 +373,6 @@ smaxloc1_16_i4 (gfc_array_i16 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc1_16_i8.c b/libgfortran/generated/maxloc1_16_i8.c
index 6c6a790a93ca..63de2a1a94e5 100644
--- a/libgfortran/generated/maxloc1_16_i8.c
+++ b/libgfortran/generated/maxloc1_16_i8.c
@@ -64,11 +64,6 @@ maxloc1_16_i8 (gfc_array_i16 * 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;
 
@@ -105,9 +100,6 @@ maxloc1_16_i8 (gfc_array_i16 * 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");
     }
@@ -210,14 +202,6 @@ mmaxloc1_16_i8 (gfc_array_i16 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mmaxloc1_16_i8 (gfc_array_i16 * 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");
     }
@@ -392,9 +373,6 @@ smaxloc1_16_i8 (gfc_array_i16 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc1_16_r10.c b/libgfortran/generated/maxloc1_16_r10.c
index d122223ff373..e78658d58f5e 100644
--- a/libgfortran/generated/maxloc1_16_r10.c
+++ b/libgfortran/generated/maxloc1_16_r10.c
@@ -64,11 +64,6 @@ maxloc1_16_r10 (gfc_array_i16 * 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;
 
@@ -105,9 +100,6 @@ maxloc1_16_r10 (gfc_array_i16 * 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");
     }
@@ -210,14 +202,6 @@ mmaxloc1_16_r10 (gfc_array_i16 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mmaxloc1_16_r10 (gfc_array_i16 * 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");
     }
@@ -392,9 +373,6 @@ smaxloc1_16_r10 (gfc_array_i16 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc1_16_r16.c b/libgfortran/generated/maxloc1_16_r16.c
index 18d122560493..c92dfc9cc39c 100644
--- a/libgfortran/generated/maxloc1_16_r16.c
+++ b/libgfortran/generated/maxloc1_16_r16.c
@@ -64,11 +64,6 @@ maxloc1_16_r16 (gfc_array_i16 * 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;
 
@@ -105,9 +100,6 @@ maxloc1_16_r16 (gfc_array_i16 * 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");
     }
@@ -210,14 +202,6 @@ mmaxloc1_16_r16 (gfc_array_i16 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mmaxloc1_16_r16 (gfc_array_i16 * 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");
     }
@@ -392,9 +373,6 @@ smaxloc1_16_r16 (gfc_array_i16 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc1_16_r4.c b/libgfortran/generated/maxloc1_16_r4.c
index f5fbcac366fe..dbe14d7cf08c 100644
--- a/libgfortran/generated/maxloc1_16_r4.c
+++ b/libgfortran/generated/maxloc1_16_r4.c
@@ -64,11 +64,6 @@ maxloc1_16_r4 (gfc_array_i16 * 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;
 
@@ -105,9 +100,6 @@ maxloc1_16_r4 (gfc_array_i16 * 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");
     }
@@ -210,14 +202,6 @@ mmaxloc1_16_r4 (gfc_array_i16 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mmaxloc1_16_r4 (gfc_array_i16 * 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");
     }
@@ -392,9 +373,6 @@ smaxloc1_16_r4 (gfc_array_i16 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc1_16_r8.c b/libgfortran/generated/maxloc1_16_r8.c
index 40922e389e08..2dd306620ad2 100644
--- a/libgfortran/generated/maxloc1_16_r8.c
+++ b/libgfortran/generated/maxloc1_16_r8.c
@@ -64,11 +64,6 @@ maxloc1_16_r8 (gfc_array_i16 * 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;
 
@@ -105,9 +100,6 @@ maxloc1_16_r8 (gfc_array_i16 * 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");
     }
@@ -210,14 +202,6 @@ mmaxloc1_16_r8 (gfc_array_i16 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mmaxloc1_16_r8 (gfc_array_i16 * 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");
     }
@@ -392,9 +373,6 @@ smaxloc1_16_r8 (gfc_array_i16 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc1_4_i16.c b/libgfortran/generated/maxloc1_4_i16.c
index 1dfb06d9cde2..d3609fb6ef73 100644
--- a/libgfortran/generated/maxloc1_4_i16.c
+++ b/libgfortran/generated/maxloc1_4_i16.c
@@ -64,11 +64,6 @@ maxloc1_4_i16 (gfc_array_i4 * 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;
 
@@ -105,9 +100,6 @@ maxloc1_4_i16 (gfc_array_i4 * 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");
     }
@@ -210,14 +202,6 @@ mmaxloc1_4_i16 (gfc_array_i4 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mmaxloc1_4_i16 (gfc_array_i4 * 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");
     }
@@ -392,9 +373,6 @@ smaxloc1_4_i16 (gfc_array_i4 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc1_4_i4.c b/libgfortran/generated/maxloc1_4_i4.c
index ae016accbc23..d4f53a4bcb2b 100644
--- a/libgfortran/generated/maxloc1_4_i4.c
+++ b/libgfortran/generated/maxloc1_4_i4.c
@@ -64,11 +64,6 @@ maxloc1_4_i4 (gfc_array_i4 * 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;
 
@@ -105,9 +100,6 @@ maxloc1_4_i4 (gfc_array_i4 * 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");
     }
@@ -210,14 +202,6 @@ mmaxloc1_4_i4 (gfc_array_i4 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mmaxloc1_4_i4 (gfc_array_i4 * 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");
     }
@@ -392,9 +373,6 @@ smaxloc1_4_i4 (gfc_array_i4 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc1_4_i8.c b/libgfortran/generated/maxloc1_4_i8.c
index d55059bbe2a1..71e804560a18 100644
--- a/libgfortran/generated/maxloc1_4_i8.c
+++ b/libgfortran/generated/maxloc1_4_i8.c
@@ -64,11 +64,6 @@ maxloc1_4_i8 (gfc_array_i4 * 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;
 
@@ -105,9 +100,6 @@ maxloc1_4_i8 (gfc_array_i4 * 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");
     }
@@ -210,14 +202,6 @@ mmaxloc1_4_i8 (gfc_array_i4 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mmaxloc1_4_i8 (gfc_array_i4 * 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");
     }
@@ -392,9 +373,6 @@ smaxloc1_4_i8 (gfc_array_i4 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc1_4_r10.c b/libgfortran/generated/maxloc1_4_r10.c
index 70a0b7b2b78b..3c376591fc3c 100644
--- a/libgfortran/generated/maxloc1_4_r10.c
+++ b/libgfortran/generated/maxloc1_4_r10.c
@@ -64,11 +64,6 @@ maxloc1_4_r10 (gfc_array_i4 * 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;
 
@@ -105,9 +100,6 @@ maxloc1_4_r10 (gfc_array_i4 * 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");
     }
@@ -210,14 +202,6 @@ mmaxloc1_4_r10 (gfc_array_i4 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mmaxloc1_4_r10 (gfc_array_i4 * 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");
     }
@@ -392,9 +373,6 @@ smaxloc1_4_r10 (gfc_array_i4 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc1_4_r16.c b/libgfortran/generated/maxloc1_4_r16.c
index e3abb9c02ba6..6c98b6f0adaa 100644
--- a/libgfortran/generated/maxloc1_4_r16.c
+++ b/libgfortran/generated/maxloc1_4_r16.c
@@ -64,11 +64,6 @@ maxloc1_4_r16 (gfc_array_i4 * 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;
 
@@ -105,9 +100,6 @@ maxloc1_4_r16 (gfc_array_i4 * 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");
     }
@@ -210,14 +202,6 @@ mmaxloc1_4_r16 (gfc_array_i4 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mmaxloc1_4_r16 (gfc_array_i4 * 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");
     }
@@ -392,9 +373,6 @@ smaxloc1_4_r16 (gfc_array_i4 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc1_4_r4.c b/libgfortran/generated/maxloc1_4_r4.c
index bcecc57d02e9..e9b8d454cf53 100644
--- a/libgfortran/generated/maxloc1_4_r4.c
+++ b/libgfortran/generated/maxloc1_4_r4.c
@@ -64,11 +64,6 @@ maxloc1_4_r4 (gfc_array_i4 * 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;
 
@@ -105,9 +100,6 @@ maxloc1_4_r4 (gfc_array_i4 * 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");
     }
@@ -210,14 +202,6 @@ mmaxloc1_4_r4 (gfc_array_i4 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mmaxloc1_4_r4 (gfc_array_i4 * 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");
     }
@@ -392,9 +373,6 @@ smaxloc1_4_r4 (gfc_array_i4 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc1_4_r8.c b/libgfortran/generated/maxloc1_4_r8.c
index 5bcf032557d3..4651e3751fdc 100644
--- a/libgfortran/generated/maxloc1_4_r8.c
+++ b/libgfortran/generated/maxloc1_4_r8.c
@@ -64,11 +64,6 @@ maxloc1_4_r8 (gfc_array_i4 * 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;
 
@@ -105,9 +100,6 @@ maxloc1_4_r8 (gfc_array_i4 * 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");
     }
@@ -210,14 +202,6 @@ mmaxloc1_4_r8 (gfc_array_i4 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mmaxloc1_4_r8 (gfc_array_i4 * 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");
     }
@@ -392,9 +373,6 @@ smaxloc1_4_r8 (gfc_array_i4 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc1_8_i16.c b/libgfortran/generated/maxloc1_8_i16.c
index 8d5491a4b6d8..811bb2945432 100644
--- a/libgfortran/generated/maxloc1_8_i16.c
+++ b/libgfortran/generated/maxloc1_8_i16.c
@@ -64,11 +64,6 @@ maxloc1_8_i16 (gfc_array_i8 * 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;
 
@@ -105,9 +100,6 @@ maxloc1_8_i16 (gfc_array_i8 * 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");
     }
@@ -210,14 +202,6 @@ mmaxloc1_8_i16 (gfc_array_i8 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mmaxloc1_8_i16 (gfc_array_i8 * 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");
     }
@@ -392,9 +373,6 @@ smaxloc1_8_i16 (gfc_array_i8 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc1_8_i4.c b/libgfortran/generated/maxloc1_8_i4.c
index 5c187e25daa8..459d87db0ff4 100644
--- a/libgfortran/generated/maxloc1_8_i4.c
+++ b/libgfortran/generated/maxloc1_8_i4.c
@@ -64,11 +64,6 @@ maxloc1_8_i4 (gfc_array_i8 * 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;
 
@@ -105,9 +100,6 @@ maxloc1_8_i4 (gfc_array_i8 * 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");
     }
@@ -210,14 +202,6 @@ mmaxloc1_8_i4 (gfc_array_i8 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mmaxloc1_8_i4 (gfc_array_i8 * 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");
     }
@@ -392,9 +373,6 @@ smaxloc1_8_i4 (gfc_array_i8 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc1_8_i8.c b/libgfortran/generated/maxloc1_8_i8.c
index ea1231789405..da054c05b51a 100644
--- a/libgfortran/generated/maxloc1_8_i8.c
+++ b/libgfortran/generated/maxloc1_8_i8.c
@@ -64,11 +64,6 @@ maxloc1_8_i8 (gfc_array_i8 * 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;
 
@@ -105,9 +100,6 @@ maxloc1_8_i8 (gfc_array_i8 * 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");
     }
@@ -210,14 +202,6 @@ mmaxloc1_8_i8 (gfc_array_i8 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mmaxloc1_8_i8 (gfc_array_i8 * 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");
     }
@@ -392,9 +373,6 @@ smaxloc1_8_i8 (gfc_array_i8 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc1_8_r10.c b/libgfortran/generated/maxloc1_8_r10.c
index 40972e64840d..94d538eeeca9 100644
--- a/libgfortran/generated/maxloc1_8_r10.c
+++ b/libgfortran/generated/maxloc1_8_r10.c
@@ -64,11 +64,6 @@ maxloc1_8_r10 (gfc_array_i8 * 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;
 
@@ -105,9 +100,6 @@ maxloc1_8_r10 (gfc_array_i8 * 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");
     }
@@ -210,14 +202,6 @@ mmaxloc1_8_r10 (gfc_array_i8 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mmaxloc1_8_r10 (gfc_array_i8 * 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");
     }
@@ -392,9 +373,6 @@ smaxloc1_8_r10 (gfc_array_i8 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc1_8_r16.c b/libgfortran/generated/maxloc1_8_r16.c
index 11f3e05aa756..01b237eb9762 100644
--- a/libgfortran/generated/maxloc1_8_r16.c
+++ b/libgfortran/generated/maxloc1_8_r16.c
@@ -64,11 +64,6 @@ maxloc1_8_r16 (gfc_array_i8 * 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;
 
@@ -105,9 +100,6 @@ maxloc1_8_r16 (gfc_array_i8 * 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");
     }
@@ -210,14 +202,6 @@ mmaxloc1_8_r16 (gfc_array_i8 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mmaxloc1_8_r16 (gfc_array_i8 * 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");
     }
@@ -392,9 +373,6 @@ smaxloc1_8_r16 (gfc_array_i8 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc1_8_r4.c b/libgfortran/generated/maxloc1_8_r4.c
index 10bd416338e0..359cb7c1543d 100644
--- a/libgfortran/generated/maxloc1_8_r4.c
+++ b/libgfortran/generated/maxloc1_8_r4.c
@@ -64,11 +64,6 @@ maxloc1_8_r4 (gfc_array_i8 * 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;
 
@@ -105,9 +100,6 @@ maxloc1_8_r4 (gfc_array_i8 * 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");
     }
@@ -210,14 +202,6 @@ mmaxloc1_8_r4 (gfc_array_i8 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mmaxloc1_8_r4 (gfc_array_i8 * 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");
     }
@@ -392,9 +373,6 @@ smaxloc1_8_r4 (gfc_array_i8 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxloc1_8_r8.c b/libgfortran/generated/maxloc1_8_r8.c
index 534e6cd80d6f..8e91eb3d2fb1 100644
--- a/libgfortran/generated/maxloc1_8_r8.c
+++ b/libgfortran/generated/maxloc1_8_r8.c
@@ -64,11 +64,6 @@ maxloc1_8_r8 (gfc_array_i8 * 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;
 
@@ -105,9 +100,6 @@ maxloc1_8_r8 (gfc_array_i8 * 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");
     }
@@ -210,14 +202,6 @@ mmaxloc1_8_r8 (gfc_array_i8 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mmaxloc1_8_r8 (gfc_array_i8 * 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");
     }
@@ -392,9 +373,6 @@ smaxloc1_8_r8 (gfc_array_i8 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxval_i16.c b/libgfortran/generated/maxval_i16.c
index 2b505803daf5..77412e50d323 100644
--- a/libgfortran/generated/maxval_i16.c
+++ b/libgfortran/generated/maxval_i16.c
@@ -63,11 +63,6 @@ maxval_i16 (gfc_array_i16 * 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;
 
@@ -104,9 +99,6 @@ maxval_i16 (gfc_array_i16 * 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");
     }
@@ -204,14 +196,6 @@ mmaxval_i16 (gfc_array_i16 * 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;
-
-  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;
@@ -253,9 +237,6 @@ mmaxval_i16 (gfc_array_i16 * 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");
     }
@@ -381,9 +362,6 @@ smaxval_i16 (gfc_array_i16 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxval_i4.c b/libgfortran/generated/maxval_i4.c
index 65136953239f..2f135802179a 100644
--- a/libgfortran/generated/maxval_i4.c
+++ b/libgfortran/generated/maxval_i4.c
@@ -63,11 +63,6 @@ maxval_i4 (gfc_array_i4 * 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;
 
@@ -104,9 +99,6 @@ maxval_i4 (gfc_array_i4 * 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");
     }
@@ -204,14 +196,6 @@ mmaxval_i4 (gfc_array_i4 * 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;
-
-  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;
@@ -253,9 +237,6 @@ mmaxval_i4 (gfc_array_i4 * 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");
     }
@@ -381,9 +362,6 @@ smaxval_i4 (gfc_array_i4 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxval_i8.c b/libgfortran/generated/maxval_i8.c
index fe78be161a6e..40726c01287b 100644
--- a/libgfortran/generated/maxval_i8.c
+++ b/libgfortran/generated/maxval_i8.c
@@ -63,11 +63,6 @@ maxval_i8 (gfc_array_i8 * 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;
 
@@ -104,9 +99,6 @@ maxval_i8 (gfc_array_i8 * 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");
     }
@@ -204,14 +196,6 @@ mmaxval_i8 (gfc_array_i8 * 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;
-
-  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;
@@ -253,9 +237,6 @@ mmaxval_i8 (gfc_array_i8 * 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");
     }
@@ -381,9 +362,6 @@ smaxval_i8 (gfc_array_i8 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxval_r10.c b/libgfortran/generated/maxval_r10.c
index 5f9c5db89fe3..db319884bb50 100644
--- a/libgfortran/generated/maxval_r10.c
+++ b/libgfortran/generated/maxval_r10.c
@@ -63,11 +63,6 @@ maxval_r10 (gfc_array_r10 * 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;
 
@@ -104,9 +99,6 @@ maxval_r10 (gfc_array_r10 * 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");
     }
@@ -204,14 +196,6 @@ mmaxval_r10 (gfc_array_r10 * 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;
-
-  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;
@@ -253,9 +237,6 @@ mmaxval_r10 (gfc_array_r10 * 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");
     }
@@ -381,9 +362,6 @@ smaxval_r10 (gfc_array_r10 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxval_r16.c b/libgfortran/generated/maxval_r16.c
index a52669164cce..abb41bb18099 100644
--- a/libgfortran/generated/maxval_r16.c
+++ b/libgfortran/generated/maxval_r16.c
@@ -63,11 +63,6 @@ maxval_r16 (gfc_array_r16 * 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;
 
@@ -104,9 +99,6 @@ maxval_r16 (gfc_array_r16 * 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");
     }
@@ -204,14 +196,6 @@ mmaxval_r16 (gfc_array_r16 * 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;
-
-  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;
@@ -253,9 +237,6 @@ mmaxval_r16 (gfc_array_r16 * 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");
     }
@@ -381,9 +362,6 @@ smaxval_r16 (gfc_array_r16 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxval_r4.c b/libgfortran/generated/maxval_r4.c
index 23cee97d5e02..217a37b19ee5 100644
--- a/libgfortran/generated/maxval_r4.c
+++ b/libgfortran/generated/maxval_r4.c
@@ -63,11 +63,6 @@ maxval_r4 (gfc_array_r4 * 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;
 
@@ -104,9 +99,6 @@ maxval_r4 (gfc_array_r4 * 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");
     }
@@ -204,14 +196,6 @@ mmaxval_r4 (gfc_array_r4 * 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;
-
-  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;
@@ -253,9 +237,6 @@ mmaxval_r4 (gfc_array_r4 * 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");
     }
@@ -381,9 +362,6 @@ smaxval_r4 (gfc_array_r4 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/maxval_r8.c b/libgfortran/generated/maxval_r8.c
index 2fd37e5fa9ba..f455afc5fdf4 100644
--- a/libgfortran/generated/maxval_r8.c
+++ b/libgfortran/generated/maxval_r8.c
@@ -63,11 +63,6 @@ maxval_r8 (gfc_array_r8 * 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;
 
@@ -104,9 +99,6 @@ maxval_r8 (gfc_array_r8 * 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");
     }
@@ -204,14 +196,6 @@ mmaxval_r8 (gfc_array_r8 * 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;
-
-  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;
@@ -253,9 +237,6 @@ mmaxval_r8 (gfc_array_r8 * 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");
     }
@@ -381,9 +362,6 @@ smaxval_r8 (gfc_array_r8 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc0_16_i16.c b/libgfortran/generated/minloc0_16_i16.c
index d41276d92306..3a85b1bad718 100644
--- a/libgfortran/generated/minloc0_16_i16.c
+++ b/libgfortran/generated/minloc0_16_i16.c
@@ -76,16 +76,8 @@ minloc0_16_i16 (gfc_array_i16 * 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++)
@@ -196,19 +188,8 @@ mminloc0_16_i16 (gfc_array_i16 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ sminloc0_16_i16 (gfc_array_i16 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc0_16_i4.c b/libgfortran/generated/minloc0_16_i4.c
index 16e08638005e..5fc61237e46d 100644
--- a/libgfortran/generated/minloc0_16_i4.c
+++ b/libgfortran/generated/minloc0_16_i4.c
@@ -76,16 +76,8 @@ minloc0_16_i4 (gfc_array_i16 * 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++)
@@ -196,19 +188,8 @@ mminloc0_16_i4 (gfc_array_i16 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ sminloc0_16_i4 (gfc_array_i16 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc0_16_i8.c b/libgfortran/generated/minloc0_16_i8.c
index bd2f08a56d1e..486108fed4b4 100644
--- a/libgfortran/generated/minloc0_16_i8.c
+++ b/libgfortran/generated/minloc0_16_i8.c
@@ -76,16 +76,8 @@ minloc0_16_i8 (gfc_array_i16 * 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++)
@@ -196,19 +188,8 @@ mminloc0_16_i8 (gfc_array_i16 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ sminloc0_16_i8 (gfc_array_i16 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc0_16_r10.c b/libgfortran/generated/minloc0_16_r10.c
index ab88d299975e..e00fb5032d50 100644
--- a/libgfortran/generated/minloc0_16_r10.c
+++ b/libgfortran/generated/minloc0_16_r10.c
@@ -76,16 +76,8 @@ minloc0_16_r10 (gfc_array_i16 * 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++)
@@ -196,19 +188,8 @@ mminloc0_16_r10 (gfc_array_i16 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ sminloc0_16_r10 (gfc_array_i16 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc0_16_r16.c b/libgfortran/generated/minloc0_16_r16.c
index c71a24081aa8..c6a8d8e5e7a2 100644
--- a/libgfortran/generated/minloc0_16_r16.c
+++ b/libgfortran/generated/minloc0_16_r16.c
@@ -76,16 +76,8 @@ minloc0_16_r16 (gfc_array_i16 * 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++)
@@ -196,19 +188,8 @@ mminloc0_16_r16 (gfc_array_i16 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ sminloc0_16_r16 (gfc_array_i16 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc0_16_r4.c b/libgfortran/generated/minloc0_16_r4.c
index 4cfa38934e9f..f6b10c83a423 100644
--- a/libgfortran/generated/minloc0_16_r4.c
+++ b/libgfortran/generated/minloc0_16_r4.c
@@ -76,16 +76,8 @@ minloc0_16_r4 (gfc_array_i16 * 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++)
@@ -196,19 +188,8 @@ mminloc0_16_r4 (gfc_array_i16 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ sminloc0_16_r4 (gfc_array_i16 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc0_16_r8.c b/libgfortran/generated/minloc0_16_r8.c
index 52ef10b58671..c129cd70d2fa 100644
--- a/libgfortran/generated/minloc0_16_r8.c
+++ b/libgfortran/generated/minloc0_16_r8.c
@@ -76,16 +76,8 @@ minloc0_16_r8 (gfc_array_i16 * 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++)
@@ -196,19 +188,8 @@ mminloc0_16_r8 (gfc_array_i16 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ sminloc0_16_r8 (gfc_array_i16 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc0_4_i16.c b/libgfortran/generated/minloc0_4_i16.c
index 5486e93739d3..37233a78e2b8 100644
--- a/libgfortran/generated/minloc0_4_i16.c
+++ b/libgfortran/generated/minloc0_4_i16.c
@@ -76,16 +76,8 @@ minloc0_4_i16 (gfc_array_i4 * 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++)
@@ -196,19 +188,8 @@ mminloc0_4_i16 (gfc_array_i4 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ sminloc0_4_i16 (gfc_array_i4 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc0_4_i4.c b/libgfortran/generated/minloc0_4_i4.c
index 519b10ecf3aa..c246b96ff293 100644
--- a/libgfortran/generated/minloc0_4_i4.c
+++ b/libgfortran/generated/minloc0_4_i4.c
@@ -76,16 +76,8 @@ minloc0_4_i4 (gfc_array_i4 * 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++)
@@ -196,19 +188,8 @@ mminloc0_4_i4 (gfc_array_i4 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ sminloc0_4_i4 (gfc_array_i4 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc0_4_i8.c b/libgfortran/generated/minloc0_4_i8.c
index 3988838666bc..8b03ceba63d0 100644
--- a/libgfortran/generated/minloc0_4_i8.c
+++ b/libgfortran/generated/minloc0_4_i8.c
@@ -76,16 +76,8 @@ minloc0_4_i8 (gfc_array_i4 * 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++)
@@ -196,19 +188,8 @@ mminloc0_4_i8 (gfc_array_i4 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ sminloc0_4_i8 (gfc_array_i4 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc0_4_r10.c b/libgfortran/generated/minloc0_4_r10.c
index 5c0ccfbb59f6..06664d89ecec 100644
--- a/libgfortran/generated/minloc0_4_r10.c
+++ b/libgfortran/generated/minloc0_4_r10.c
@@ -76,16 +76,8 @@ minloc0_4_r10 (gfc_array_i4 * 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++)
@@ -196,19 +188,8 @@ mminloc0_4_r10 (gfc_array_i4 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ sminloc0_4_r10 (gfc_array_i4 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc0_4_r16.c b/libgfortran/generated/minloc0_4_r16.c
index fbb75bab50c0..29c880c68457 100644
--- a/libgfortran/generated/minloc0_4_r16.c
+++ b/libgfortran/generated/minloc0_4_r16.c
@@ -76,16 +76,8 @@ minloc0_4_r16 (gfc_array_i4 * 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++)
@@ -196,19 +188,8 @@ mminloc0_4_r16 (gfc_array_i4 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ sminloc0_4_r16 (gfc_array_i4 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc0_4_r4.c b/libgfortran/generated/minloc0_4_r4.c
index 911117696ea0..99c6c2f318b0 100644
--- a/libgfortran/generated/minloc0_4_r4.c
+++ b/libgfortran/generated/minloc0_4_r4.c
@@ -76,16 +76,8 @@ minloc0_4_r4 (gfc_array_i4 * 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++)
@@ -196,19 +188,8 @@ mminloc0_4_r4 (gfc_array_i4 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ sminloc0_4_r4 (gfc_array_i4 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc0_4_r8.c b/libgfortran/generated/minloc0_4_r8.c
index 461bedb9dfb1..08d645ea5845 100644
--- a/libgfortran/generated/minloc0_4_r8.c
+++ b/libgfortran/generated/minloc0_4_r8.c
@@ -76,16 +76,8 @@ minloc0_4_r8 (gfc_array_i4 * 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++)
@@ -196,19 +188,8 @@ mminloc0_4_r8 (gfc_array_i4 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ sminloc0_4_r8 (gfc_array_i4 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc0_8_i16.c b/libgfortran/generated/minloc0_8_i16.c
index 92bb0a225192..f669a93dcb65 100644
--- a/libgfortran/generated/minloc0_8_i16.c
+++ b/libgfortran/generated/minloc0_8_i16.c
@@ -76,16 +76,8 @@ minloc0_8_i16 (gfc_array_i8 * 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++)
@@ -196,19 +188,8 @@ mminloc0_8_i16 (gfc_array_i8 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ sminloc0_8_i16 (gfc_array_i8 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc0_8_i4.c b/libgfortran/generated/minloc0_8_i4.c
index 6229244751fd..349c8b3c5258 100644
--- a/libgfortran/generated/minloc0_8_i4.c
+++ b/libgfortran/generated/minloc0_8_i4.c
@@ -76,16 +76,8 @@ minloc0_8_i4 (gfc_array_i8 * 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++)
@@ -196,19 +188,8 @@ mminloc0_8_i4 (gfc_array_i8 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ sminloc0_8_i4 (gfc_array_i8 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc0_8_i8.c b/libgfortran/generated/minloc0_8_i8.c
index 01090ed9366b..00d737e9a5ca 100644
--- a/libgfortran/generated/minloc0_8_i8.c
+++ b/libgfortran/generated/minloc0_8_i8.c
@@ -76,16 +76,8 @@ minloc0_8_i8 (gfc_array_i8 * 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++)
@@ -196,19 +188,8 @@ mminloc0_8_i8 (gfc_array_i8 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ sminloc0_8_i8 (gfc_array_i8 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc0_8_r10.c b/libgfortran/generated/minloc0_8_r10.c
index 8bd4251829a5..c95778c57653 100644
--- a/libgfortran/generated/minloc0_8_r10.c
+++ b/libgfortran/generated/minloc0_8_r10.c
@@ -76,16 +76,8 @@ minloc0_8_r10 (gfc_array_i8 * 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++)
@@ -196,19 +188,8 @@ mminloc0_8_r10 (gfc_array_i8 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ sminloc0_8_r10 (gfc_array_i8 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc0_8_r16.c b/libgfortran/generated/minloc0_8_r16.c
index ea229d7e4032..1d968f896070 100644
--- a/libgfortran/generated/minloc0_8_r16.c
+++ b/libgfortran/generated/minloc0_8_r16.c
@@ -76,16 +76,8 @@ minloc0_8_r16 (gfc_array_i8 * 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++)
@@ -196,19 +188,8 @@ mminloc0_8_r16 (gfc_array_i8 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ sminloc0_8_r16 (gfc_array_i8 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc0_8_r4.c b/libgfortran/generated/minloc0_8_r4.c
index e91466e28adc..f83af9366a54 100644
--- a/libgfortran/generated/minloc0_8_r4.c
+++ b/libgfortran/generated/minloc0_8_r4.c
@@ -76,16 +76,8 @@ minloc0_8_r4 (gfc_array_i8 * 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++)
@@ -196,19 +188,8 @@ mminloc0_8_r4 (gfc_array_i8 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ sminloc0_8_r4 (gfc_array_i8 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc0_8_r8.c b/libgfortran/generated/minloc0_8_r8.c
index 00d3718f92f3..8784b280b096 100644
--- a/libgfortran/generated/minloc0_8_r8.c
+++ b/libgfortran/generated/minloc0_8_r8.c
@@ -76,16 +76,8 @@ minloc0_8_r8 (gfc_array_i8 * 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++)
@@ -196,19 +188,8 @@ mminloc0_8_r8 (gfc_array_i8 * 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;
-
-  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++)
@@ -335,9 +316,6 @@ sminloc0_8_r8 (gfc_array_i8 * 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;
     }
 
   dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc1_16_i16.c b/libgfortran/generated/minloc1_16_i16.c
index 5c49e798e063..e1aa42abad9e 100644
--- a/libgfortran/generated/minloc1_16_i16.c
+++ b/libgfortran/generated/minloc1_16_i16.c
@@ -64,11 +64,6 @@ minloc1_16_i16 (gfc_array_i16 * 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;
 
@@ -105,9 +100,6 @@ minloc1_16_i16 (gfc_array_i16 * 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");
     }
@@ -210,14 +202,6 @@ mminloc1_16_i16 (gfc_array_i16 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mminloc1_16_i16 (gfc_array_i16 * 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");
     }
@@ -392,9 +373,6 @@ sminloc1_16_i16 (gfc_array_i16 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc1_16_i4.c b/libgfortran/generated/minloc1_16_i4.c
index cba6b90cfb8b..6a42d90baa45 100644
--- a/libgfortran/generated/minloc1_16_i4.c
+++ b/libgfortran/generated/minloc1_16_i4.c
@@ -64,11 +64,6 @@ minloc1_16_i4 (gfc_array_i16 * 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;
 
@@ -105,9 +100,6 @@ minloc1_16_i4 (gfc_array_i16 * 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");
     }
@@ -210,14 +202,6 @@ mminloc1_16_i4 (gfc_array_i16 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mminloc1_16_i4 (gfc_array_i16 * 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");
     }
@@ -392,9 +373,6 @@ sminloc1_16_i4 (gfc_array_i16 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc1_16_i8.c b/libgfortran/generated/minloc1_16_i8.c
index ba8be3987ad7..72d0f94f2134 100644
--- a/libgfortran/generated/minloc1_16_i8.c
+++ b/libgfortran/generated/minloc1_16_i8.c
@@ -64,11 +64,6 @@ minloc1_16_i8 (gfc_array_i16 * 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;
 
@@ -105,9 +100,6 @@ minloc1_16_i8 (gfc_array_i16 * 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");
     }
@@ -210,14 +202,6 @@ mminloc1_16_i8 (gfc_array_i16 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mminloc1_16_i8 (gfc_array_i16 * 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");
     }
@@ -392,9 +373,6 @@ sminloc1_16_i8 (gfc_array_i16 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc1_16_r10.c b/libgfortran/generated/minloc1_16_r10.c
index 3553c224faab..16d5903ff9da 100644
--- a/libgfortran/generated/minloc1_16_r10.c
+++ b/libgfortran/generated/minloc1_16_r10.c
@@ -64,11 +64,6 @@ minloc1_16_r10 (gfc_array_i16 * 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;
 
@@ -105,9 +100,6 @@ minloc1_16_r10 (gfc_array_i16 * 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");
     }
@@ -210,14 +202,6 @@ mminloc1_16_r10 (gfc_array_i16 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mminloc1_16_r10 (gfc_array_i16 * 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");
     }
@@ -392,9 +373,6 @@ sminloc1_16_r10 (gfc_array_i16 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc1_16_r16.c b/libgfortran/generated/minloc1_16_r16.c
index 258a5e21561d..aee2cd1a9b89 100644
--- a/libgfortran/generated/minloc1_16_r16.c
+++ b/libgfortran/generated/minloc1_16_r16.c
@@ -64,11 +64,6 @@ minloc1_16_r16 (gfc_array_i16 * 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;
 
@@ -105,9 +100,6 @@ minloc1_16_r16 (gfc_array_i16 * 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");
     }
@@ -210,14 +202,6 @@ mminloc1_16_r16 (gfc_array_i16 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mminloc1_16_r16 (gfc_array_i16 * 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");
     }
@@ -392,9 +373,6 @@ sminloc1_16_r16 (gfc_array_i16 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc1_16_r4.c b/libgfortran/generated/minloc1_16_r4.c
index 86ba66700409..16bbfeaea03a 100644
--- a/libgfortran/generated/minloc1_16_r4.c
+++ b/libgfortran/generated/minloc1_16_r4.c
@@ -64,11 +64,6 @@ minloc1_16_r4 (gfc_array_i16 * 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;
 
@@ -105,9 +100,6 @@ minloc1_16_r4 (gfc_array_i16 * 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");
     }
@@ -210,14 +202,6 @@ mminloc1_16_r4 (gfc_array_i16 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mminloc1_16_r4 (gfc_array_i16 * 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");
     }
@@ -392,9 +373,6 @@ sminloc1_16_r4 (gfc_array_i16 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc1_16_r8.c b/libgfortran/generated/minloc1_16_r8.c
index 1fe86e5019cf..fe7c940bbe70 100644
--- a/libgfortran/generated/minloc1_16_r8.c
+++ b/libgfortran/generated/minloc1_16_r8.c
@@ -64,11 +64,6 @@ minloc1_16_r8 (gfc_array_i16 * 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;
 
@@ -105,9 +100,6 @@ minloc1_16_r8 (gfc_array_i16 * 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");
     }
@@ -210,14 +202,6 @@ mminloc1_16_r8 (gfc_array_i16 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mminloc1_16_r8 (gfc_array_i16 * 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");
     }
@@ -392,9 +373,6 @@ sminloc1_16_r8 (gfc_array_i16 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc1_4_i16.c b/libgfortran/generated/minloc1_4_i16.c
index 5952d216005b..327e8c9116de 100644
--- a/libgfortran/generated/minloc1_4_i16.c
+++ b/libgfortran/generated/minloc1_4_i16.c
@@ -64,11 +64,6 @@ minloc1_4_i16 (gfc_array_i4 * 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;
 
@@ -105,9 +100,6 @@ minloc1_4_i16 (gfc_array_i4 * 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");
     }
@@ -210,14 +202,6 @@ mminloc1_4_i16 (gfc_array_i4 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mminloc1_4_i16 (gfc_array_i4 * 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");
     }
@@ -392,9 +373,6 @@ sminloc1_4_i16 (gfc_array_i4 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc1_4_i4.c b/libgfortran/generated/minloc1_4_i4.c
index 79321f14a818..a7dfa1f6396e 100644
--- a/libgfortran/generated/minloc1_4_i4.c
+++ b/libgfortran/generated/minloc1_4_i4.c
@@ -64,11 +64,6 @@ minloc1_4_i4 (gfc_array_i4 * 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;
 
@@ -105,9 +100,6 @@ minloc1_4_i4 (gfc_array_i4 * 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");
     }
@@ -210,14 +202,6 @@ mminloc1_4_i4 (gfc_array_i4 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mminloc1_4_i4 (gfc_array_i4 * 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");
     }
@@ -392,9 +373,6 @@ sminloc1_4_i4 (gfc_array_i4 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc1_4_i8.c b/libgfortran/generated/minloc1_4_i8.c
index 625328beac9e..34d0192861e6 100644
--- a/libgfortran/generated/minloc1_4_i8.c
+++ b/libgfortran/generated/minloc1_4_i8.c
@@ -64,11 +64,6 @@ minloc1_4_i8 (gfc_array_i4 * 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;
 
@@ -105,9 +100,6 @@ minloc1_4_i8 (gfc_array_i4 * 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");
     }
@@ -210,14 +202,6 @@ mminloc1_4_i8 (gfc_array_i4 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mminloc1_4_i8 (gfc_array_i4 * 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");
     }
@@ -392,9 +373,6 @@ sminloc1_4_i8 (gfc_array_i4 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc1_4_r10.c b/libgfortran/generated/minloc1_4_r10.c
index ab4d5b415b78..1a0d1b55562f 100644
--- a/libgfortran/generated/minloc1_4_r10.c
+++ b/libgfortran/generated/minloc1_4_r10.c
@@ -64,11 +64,6 @@ minloc1_4_r10 (gfc_array_i4 * 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;
 
@@ -105,9 +100,6 @@ minloc1_4_r10 (gfc_array_i4 * 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");
     }
@@ -210,14 +202,6 @@ mminloc1_4_r10 (gfc_array_i4 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mminloc1_4_r10 (gfc_array_i4 * 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");
     }
@@ -392,9 +373,6 @@ sminloc1_4_r10 (gfc_array_i4 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc1_4_r16.c b/libgfortran/generated/minloc1_4_r16.c
index 9ffdd331ddaf..ea3f02017093 100644
--- a/libgfortran/generated/minloc1_4_r16.c
+++ b/libgfortran/generated/minloc1_4_r16.c
@@ -64,11 +64,6 @@ minloc1_4_r16 (gfc_array_i4 * 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;
 
@@ -105,9 +100,6 @@ minloc1_4_r16 (gfc_array_i4 * 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");
     }
@@ -210,14 +202,6 @@ mminloc1_4_r16 (gfc_array_i4 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mminloc1_4_r16 (gfc_array_i4 * 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");
     }
@@ -392,9 +373,6 @@ sminloc1_4_r16 (gfc_array_i4 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc1_4_r4.c b/libgfortran/generated/minloc1_4_r4.c
index a91ee8da0dea..c788433d13cc 100644
--- a/libgfortran/generated/minloc1_4_r4.c
+++ b/libgfortran/generated/minloc1_4_r4.c
@@ -64,11 +64,6 @@ minloc1_4_r4 (gfc_array_i4 * 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;
 
@@ -105,9 +100,6 @@ minloc1_4_r4 (gfc_array_i4 * 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");
     }
@@ -210,14 +202,6 @@ mminloc1_4_r4 (gfc_array_i4 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mminloc1_4_r4 (gfc_array_i4 * 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");
     }
@@ -392,9 +373,6 @@ sminloc1_4_r4 (gfc_array_i4 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc1_4_r8.c b/libgfortran/generated/minloc1_4_r8.c
index 355333d20a5d..ba96e5f10a3a 100644
--- a/libgfortran/generated/minloc1_4_r8.c
+++ b/libgfortran/generated/minloc1_4_r8.c
@@ -64,11 +64,6 @@ minloc1_4_r8 (gfc_array_i4 * 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;
 
@@ -105,9 +100,6 @@ minloc1_4_r8 (gfc_array_i4 * 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");
     }
@@ -210,14 +202,6 @@ mminloc1_4_r8 (gfc_array_i4 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mminloc1_4_r8 (gfc_array_i4 * 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");
     }
@@ -392,9 +373,6 @@ sminloc1_4_r8 (gfc_array_i4 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc1_8_i16.c b/libgfortran/generated/minloc1_8_i16.c
index 4e78589fc60c..817b20e78c95 100644
--- a/libgfortran/generated/minloc1_8_i16.c
+++ b/libgfortran/generated/minloc1_8_i16.c
@@ -64,11 +64,6 @@ minloc1_8_i16 (gfc_array_i8 * 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;
 
@@ -105,9 +100,6 @@ minloc1_8_i16 (gfc_array_i8 * 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");
     }
@@ -210,14 +202,6 @@ mminloc1_8_i16 (gfc_array_i8 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mminloc1_8_i16 (gfc_array_i8 * 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");
     }
@@ -392,9 +373,6 @@ sminloc1_8_i16 (gfc_array_i8 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc1_8_i4.c b/libgfortran/generated/minloc1_8_i4.c
index ae71c33ff50b..e087776f4b85 100644
--- a/libgfortran/generated/minloc1_8_i4.c
+++ b/libgfortran/generated/minloc1_8_i4.c
@@ -64,11 +64,6 @@ minloc1_8_i4 (gfc_array_i8 * 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;
 
@@ -105,9 +100,6 @@ minloc1_8_i4 (gfc_array_i8 * 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");
     }
@@ -210,14 +202,6 @@ mminloc1_8_i4 (gfc_array_i8 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mminloc1_8_i4 (gfc_array_i8 * 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");
     }
@@ -392,9 +373,6 @@ sminloc1_8_i4 (gfc_array_i8 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc1_8_i8.c b/libgfortran/generated/minloc1_8_i8.c
index 31cc82213a0f..5c8e882b44b3 100644
--- a/libgfortran/generated/minloc1_8_i8.c
+++ b/libgfortran/generated/minloc1_8_i8.c
@@ -64,11 +64,6 @@ minloc1_8_i8 (gfc_array_i8 * 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;
 
@@ -105,9 +100,6 @@ minloc1_8_i8 (gfc_array_i8 * 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");
     }
@@ -210,14 +202,6 @@ mminloc1_8_i8 (gfc_array_i8 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mminloc1_8_i8 (gfc_array_i8 * 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");
     }
@@ -392,9 +373,6 @@ sminloc1_8_i8 (gfc_array_i8 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc1_8_r10.c b/libgfortran/generated/minloc1_8_r10.c
index 3dd3b1eca1c4..ade86acdd461 100644
--- a/libgfortran/generated/minloc1_8_r10.c
+++ b/libgfortran/generated/minloc1_8_r10.c
@@ -64,11 +64,6 @@ minloc1_8_r10 (gfc_array_i8 * 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;
 
@@ -105,9 +100,6 @@ minloc1_8_r10 (gfc_array_i8 * 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");
     }
@@ -210,14 +202,6 @@ mminloc1_8_r10 (gfc_array_i8 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mminloc1_8_r10 (gfc_array_i8 * 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");
     }
@@ -392,9 +373,6 @@ sminloc1_8_r10 (gfc_array_i8 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc1_8_r16.c b/libgfortran/generated/minloc1_8_r16.c
index 9de92d07d3e1..4137672b9d57 100644
--- a/libgfortran/generated/minloc1_8_r16.c
+++ b/libgfortran/generated/minloc1_8_r16.c
@@ -64,11 +64,6 @@ minloc1_8_r16 (gfc_array_i8 * 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;
 
@@ -105,9 +100,6 @@ minloc1_8_r16 (gfc_array_i8 * 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");
     }
@@ -210,14 +202,6 @@ mminloc1_8_r16 (gfc_array_i8 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mminloc1_8_r16 (gfc_array_i8 * 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");
     }
@@ -392,9 +373,6 @@ sminloc1_8_r16 (gfc_array_i8 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc1_8_r4.c b/libgfortran/generated/minloc1_8_r4.c
index a47ef259afa9..643ffa483a18 100644
--- a/libgfortran/generated/minloc1_8_r4.c
+++ b/libgfortran/generated/minloc1_8_r4.c
@@ -64,11 +64,6 @@ minloc1_8_r4 (gfc_array_i8 * 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;
 
@@ -105,9 +100,6 @@ minloc1_8_r4 (gfc_array_i8 * 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");
     }
@@ -210,14 +202,6 @@ mminloc1_8_r4 (gfc_array_i8 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mminloc1_8_r4 (gfc_array_i8 * 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");
     }
@@ -392,9 +373,6 @@ sminloc1_8_r4 (gfc_array_i8 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minloc1_8_r8.c b/libgfortran/generated/minloc1_8_r8.c
index 2637fe6351f4..e9e876ff2deb 100644
--- a/libgfortran/generated/minloc1_8_r8.c
+++ b/libgfortran/generated/minloc1_8_r8.c
@@ -64,11 +64,6 @@ minloc1_8_r8 (gfc_array_i8 * 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;
 
@@ -105,9 +100,6 @@ minloc1_8_r8 (gfc_array_i8 * 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");
     }
@@ -210,14 +202,6 @@ mminloc1_8_r8 (gfc_array_i8 * 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;
-
-  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;
@@ -259,9 +243,6 @@ mminloc1_8_r8 (gfc_array_i8 * 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");
     }
@@ -392,9 +373,6 @@ sminloc1_8_r8 (gfc_array_i8 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minval_i16.c b/libgfortran/generated/minval_i16.c
index f1c2e3852e6d..7854fd4c7fd8 100644
--- a/libgfortran/generated/minval_i16.c
+++ b/libgfortran/generated/minval_i16.c
@@ -63,11 +63,6 @@ minval_i16 (gfc_array_i16 * 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;
 
@@ -104,9 +99,6 @@ minval_i16 (gfc_array_i16 * 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");
     }
@@ -204,14 +196,6 @@ mminval_i16 (gfc_array_i16 * 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;
-
-  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;
@@ -253,9 +237,6 @@ mminval_i16 (gfc_array_i16 * 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");
     }
@@ -381,9 +362,6 @@ sminval_i16 (gfc_array_i16 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minval_i4.c b/libgfortran/generated/minval_i4.c
index bb79787119d8..a833529a06b0 100644
--- a/libgfortran/generated/minval_i4.c
+++ b/libgfortran/generated/minval_i4.c
@@ -63,11 +63,6 @@ minval_i4 (gfc_array_i4 * 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;
 
@@ -104,9 +99,6 @@ minval_i4 (gfc_array_i4 * 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");
     }
@@ -204,14 +196,6 @@ mminval_i4 (gfc_array_i4 * 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;
-
-  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;
@@ -253,9 +237,6 @@ mminval_i4 (gfc_array_i4 * 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");
     }
@@ -381,9 +362,6 @@ sminval_i4 (gfc_array_i4 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minval_i8.c b/libgfortran/generated/minval_i8.c
index deb533912211..9b3de20f3c18 100644
--- a/libgfortran/generated/minval_i8.c
+++ b/libgfortran/generated/minval_i8.c
@@ -63,11 +63,6 @@ minval_i8 (gfc_array_i8 * 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;
 
@@ -104,9 +99,6 @@ minval_i8 (gfc_array_i8 * 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");
     }
@@ -204,14 +196,6 @@ mminval_i8 (gfc_array_i8 * 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;
-
-  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;
@@ -253,9 +237,6 @@ mminval_i8 (gfc_array_i8 * 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");
     }
@@ -381,9 +362,6 @@ sminval_i8 (gfc_array_i8 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minval_r10.c b/libgfortran/generated/minval_r10.c
index be02a66dab95..85b51c61eb9b 100644
--- a/libgfortran/generated/minval_r10.c
+++ b/libgfortran/generated/minval_r10.c
@@ -63,11 +63,6 @@ minval_r10 (gfc_array_r10 * 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;
 
@@ -104,9 +99,6 @@ minval_r10 (gfc_array_r10 * 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");
     }
@@ -204,14 +196,6 @@ mminval_r10 (gfc_array_r10 * 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;
-
-  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;
@@ -253,9 +237,6 @@ mminval_r10 (gfc_array_r10 * 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");
     }
@@ -381,9 +362,6 @@ sminval_r10 (gfc_array_r10 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minval_r16.c b/libgfortran/generated/minval_r16.c
index cacd524fff0b..556d14c4d1a5 100644
--- a/libgfortran/generated/minval_r16.c
+++ b/libgfortran/generated/minval_r16.c
@@ -63,11 +63,6 @@ minval_r16 (gfc_array_r16 * 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;
 
@@ -104,9 +99,6 @@ minval_r16 (gfc_array_r16 * 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");
     }
@@ -204,14 +196,6 @@ mminval_r16 (gfc_array_r16 * 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;
-
-  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;
@@ -253,9 +237,6 @@ mminval_r16 (gfc_array_r16 * 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");
     }
@@ -381,9 +362,6 @@ sminval_r16 (gfc_array_r16 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minval_r4.c b/libgfortran/generated/minval_r4.c
index 0f383d97a4c7..9fe32a9a7e5b 100644
--- a/libgfortran/generated/minval_r4.c
+++ b/libgfortran/generated/minval_r4.c
@@ -63,11 +63,6 @@ minval_r4 (gfc_array_r4 * 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;
 
@@ -104,9 +99,6 @@ minval_r4 (gfc_array_r4 * 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");
     }
@@ -204,14 +196,6 @@ mminval_r4 (gfc_array_r4 * 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;
-
-  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;
@@ -253,9 +237,6 @@ mminval_r4 (gfc_array_r4 * 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");
     }
@@ -381,9 +362,6 @@ sminval_r4 (gfc_array_r4 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/minval_r8.c b/libgfortran/generated/minval_r8.c
index 31ba61935656..f71333205584 100644
--- a/libgfortran/generated/minval_r8.c
+++ b/libgfortran/generated/minval_r8.c
@@ -63,11 +63,6 @@ minval_r8 (gfc_array_r8 * 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;
 
@@ -104,9 +99,6 @@ minval_r8 (gfc_array_r8 * 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");
     }
@@ -204,14 +196,6 @@ mminval_r8 (gfc_array_r8 * 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;
-
-  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;
@@ -253,9 +237,6 @@ mminval_r8 (gfc_array_r8 * 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");
     }
@@ -381,9 +362,6 @@ sminval_r8 (gfc_array_r8 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/product_c10.c b/libgfortran/generated/product_c10.c
index 59552f276d56..af3e3c29c5e2 100644
--- a/libgfortran/generated/product_c10.c
+++ b/libgfortran/generated/product_c10.c
@@ -62,11 +62,6 @@ product_c10 (gfc_array_c10 * 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;
 
@@ -103,9 +98,6 @@ product_c10 (gfc_array_c10 * 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");
     }
@@ -202,14 +194,6 @@ mproduct_c10 (gfc_array_c10 * 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;
-
-  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;
@@ -251,9 +235,6 @@ mproduct_c10 (gfc_array_c10 * 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");
     }
@@ -379,9 +360,6 @@ sproduct_c10 (gfc_array_c10 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/product_c16.c b/libgfortran/generated/product_c16.c
index 97b6ac1a219c..f913b5f2b297 100644
--- a/libgfortran/generated/product_c16.c
+++ b/libgfortran/generated/product_c16.c
@@ -62,11 +62,6 @@ product_c16 (gfc_array_c16 * 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;
 
@@ -103,9 +98,6 @@ product_c16 (gfc_array_c16 * 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");
     }
@@ -202,14 +194,6 @@ mproduct_c16 (gfc_array_c16 * 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;
-
-  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;
@@ -251,9 +235,6 @@ mproduct_c16 (gfc_array_c16 * 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");
     }
@@ -379,9 +360,6 @@ sproduct_c16 (gfc_array_c16 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/product_c4.c b/libgfortran/generated/product_c4.c
index 14dc21eaabe4..68144dcfbe27 100644
--- a/libgfortran/generated/product_c4.c
+++ b/libgfortran/generated/product_c4.c
@@ -62,11 +62,6 @@ product_c4 (gfc_array_c4 * 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;
 
@@ -103,9 +98,6 @@ product_c4 (gfc_array_c4 * 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");
     }
@@ -202,14 +194,6 @@ mproduct_c4 (gfc_array_c4 * 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;
-
-  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;
@@ -251,9 +235,6 @@ mproduct_c4 (gfc_array_c4 * 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");
     }
@@ -379,9 +360,6 @@ sproduct_c4 (gfc_array_c4 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/product_c8.c b/libgfortran/generated/product_c8.c
index 3313f2ab1740..183e5b2dff73 100644
--- a/libgfortran/generated/product_c8.c
+++ b/libgfortran/generated/product_c8.c
@@ -62,11 +62,6 @@ product_c8 (gfc_array_c8 * 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;
 
@@ -103,9 +98,6 @@ product_c8 (gfc_array_c8 * 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");
     }
@@ -202,14 +194,6 @@ mproduct_c8 (gfc_array_c8 * 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;
-
-  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;
@@ -251,9 +235,6 @@ mproduct_c8 (gfc_array_c8 * 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");
     }
@@ -379,9 +360,6 @@ sproduct_c8 (gfc_array_c8 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/product_i16.c b/libgfortran/generated/product_i16.c
index 7079dc434134..7bd1c66247c6 100644
--- a/libgfortran/generated/product_i16.c
+++ b/libgfortran/generated/product_i16.c
@@ -62,11 +62,6 @@ product_i16 (gfc_array_i16 * 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;
 
@@ -103,9 +98,6 @@ product_i16 (gfc_array_i16 * 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");
     }
@@ -202,14 +194,6 @@ mproduct_i16 (gfc_array_i16 * 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;
-
-  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;
@@ -251,9 +235,6 @@ mproduct_i16 (gfc_array_i16 * 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");
     }
@@ -379,9 +360,6 @@ sproduct_i16 (gfc_array_i16 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/product_i4.c b/libgfortran/generated/product_i4.c
index da88e97556e0..8bf7e6480272 100644
--- a/libgfortran/generated/product_i4.c
+++ b/libgfortran/generated/product_i4.c
@@ -62,11 +62,6 @@ product_i4 (gfc_array_i4 * 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;
 
@@ -103,9 +98,6 @@ product_i4 (gfc_array_i4 * 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");
     }
@@ -202,14 +194,6 @@ mproduct_i4 (gfc_array_i4 * 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;
-
-  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;
@@ -251,9 +235,6 @@ mproduct_i4 (gfc_array_i4 * 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");
     }
@@ -379,9 +360,6 @@ sproduct_i4 (gfc_array_i4 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/product_i8.c b/libgfortran/generated/product_i8.c
index c60e8f76572c..c5f9e09e5a4e 100644
--- a/libgfortran/generated/product_i8.c
+++ b/libgfortran/generated/product_i8.c
@@ -62,11 +62,6 @@ product_i8 (gfc_array_i8 * 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;
 
@@ -103,9 +98,6 @@ product_i8 (gfc_array_i8 * 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");
     }
@@ -202,14 +194,6 @@ mproduct_i8 (gfc_array_i8 * 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;
-
-  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;
@@ -251,9 +235,6 @@ mproduct_i8 (gfc_array_i8 * 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");
     }
@@ -379,9 +360,6 @@ sproduct_i8 (gfc_array_i8 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/product_r10.c b/libgfortran/generated/product_r10.c
index 710216fff830..091cec3ca617 100644
--- a/libgfortran/generated/product_r10.c
+++ b/libgfortran/generated/product_r10.c
@@ -62,11 +62,6 @@ product_r10 (gfc_array_r10 * 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;
 
@@ -103,9 +98,6 @@ product_r10 (gfc_array_r10 * 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");
     }
@@ -202,14 +194,6 @@ mproduct_r10 (gfc_array_r10 * 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;
-
-  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;
@@ -251,9 +235,6 @@ mproduct_r10 (gfc_array_r10 * 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");
     }
@@ -379,9 +360,6 @@ sproduct_r10 (gfc_array_r10 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/product_r16.c b/libgfortran/generated/product_r16.c
index b6df4ddbb2af..4a059a9c44c3 100644
--- a/libgfortran/generated/product_r16.c
+++ b/libgfortran/generated/product_r16.c
@@ -62,11 +62,6 @@ product_r16 (gfc_array_r16 * 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;
 
@@ -103,9 +98,6 @@ product_r16 (gfc_array_r16 * 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");
     }
@@ -202,14 +194,6 @@ mproduct_r16 (gfc_array_r16 * 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;
-
-  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;
@@ -251,9 +235,6 @@ mproduct_r16 (gfc_array_r16 * 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");
     }
@@ -379,9 +360,6 @@ sproduct_r16 (gfc_array_r16 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/product_r4.c b/libgfortran/generated/product_r4.c
index e31b39452796..763dd95e2b26 100644
--- a/libgfortran/generated/product_r4.c
+++ b/libgfortran/generated/product_r4.c
@@ -62,11 +62,6 @@ product_r4 (gfc_array_r4 * 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;
 
@@ -103,9 +98,6 @@ product_r4 (gfc_array_r4 * 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");
     }
@@ -202,14 +194,6 @@ mproduct_r4 (gfc_array_r4 * 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;
-
-  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;
@@ -251,9 +235,6 @@ mproduct_r4 (gfc_array_r4 * 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");
     }
@@ -379,9 +360,6 @@ sproduct_r4 (gfc_array_r4 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/product_r8.c b/libgfortran/generated/product_r8.c
index a2e805c0d33b..43364994a174 100644
--- a/libgfortran/generated/product_r8.c
+++ b/libgfortran/generated/product_r8.c
@@ -62,11 +62,6 @@ product_r8 (gfc_array_r8 * 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;
 
@@ -103,9 +98,6 @@ product_r8 (gfc_array_r8 * 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");
     }
@@ -202,14 +194,6 @@ mproduct_r8 (gfc_array_r8 * 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;
-
-  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;
@@ -251,9 +235,6 @@ mproduct_r8 (gfc_array_r8 * 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");
     }
@@ -379,9 +360,6 @@ sproduct_r8 (gfc_array_r8 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/reshape_c10.c b/libgfortran/generated/reshape_c10.c
index 21789f87fc68..008dc2329d7f 100644
--- a/libgfortran/generated/reshape_c10.c
+++ b/libgfortran/generated/reshape_c10.c
@@ -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).
@@ -84,15 +84,6 @@ reshape_c10 (gfc_array_c10 * 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;
@@ -112,8 +103,6 @@ reshape_c10 (gfc_array_c10 * 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/generated/reshape_c16.c b/libgfortran/generated/reshape_c16.c
index f3c4a901141b..c176f2f511d4 100644
--- a/libgfortran/generated/reshape_c16.c
+++ b/libgfortran/generated/reshape_c16.c
@@ -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).
@@ -84,15 +84,6 @@ reshape_c16 (gfc_array_c16 * 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;
@@ -112,8 +103,6 @@ reshape_c16 (gfc_array_c16 * 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/generated/reshape_c4.c b/libgfortran/generated/reshape_c4.c
index 384f36f2a5d0..d71328487281 100644
--- a/libgfortran/generated/reshape_c4.c
+++ b/libgfortran/generated/reshape_c4.c
@@ -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).
@@ -84,15 +84,6 @@ reshape_c4 (gfc_array_c4 * 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;
@@ -112,8 +103,6 @@ reshape_c4 (gfc_array_c4 * 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/generated/reshape_c8.c b/libgfortran/generated/reshape_c8.c
index e2c7c399b431..5c0e1ab5566c 100644
--- a/libgfortran/generated/reshape_c8.c
+++ b/libgfortran/generated/reshape_c8.c
@@ -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).
@@ -84,15 +84,6 @@ reshape_c8 (gfc_array_c8 * 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;
@@ -112,8 +103,6 @@ reshape_c8 (gfc_array_c8 * 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/generated/reshape_i16.c b/libgfortran/generated/reshape_i16.c
index a8fece516fdc..e7767dc8df90 100644
--- a/libgfortran/generated/reshape_i16.c
+++ b/libgfortran/generated/reshape_i16.c
@@ -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).
@@ -84,15 +84,6 @@ reshape_16 (gfc_array_i16 * 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;
@@ -112,8 +103,6 @@ reshape_16 (gfc_array_i16 * 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/generated/reshape_i4.c b/libgfortran/generated/reshape_i4.c
index 2c8ee4b93a8a..e2f38e7e796f 100644
--- a/libgfortran/generated/reshape_i4.c
+++ b/libgfortran/generated/reshape_i4.c
@@ -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).
@@ -84,15 +84,6 @@ reshape_4 (gfc_array_i4 * 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;
@@ -112,8 +103,6 @@ reshape_4 (gfc_array_i4 * 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/generated/reshape_i8.c b/libgfortran/generated/reshape_i8.c
index 6ffb681700bb..5d54b074d4be 100644
--- a/libgfortran/generated/reshape_i8.c
+++ b/libgfortran/generated/reshape_i8.c
@@ -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).
@@ -84,15 +84,6 @@ reshape_8 (gfc_array_i8 * 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;
@@ -112,8 +103,6 @@ reshape_8 (gfc_array_i8 * 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/generated/reshape_r10.c b/libgfortran/generated/reshape_r10.c
index faf8b22913e7..fe514c721731 100644
--- a/libgfortran/generated/reshape_r10.c
+++ b/libgfortran/generated/reshape_r10.c
@@ -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).
@@ -84,15 +84,6 @@ reshape_r10 (gfc_array_r10 * 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;
@@ -112,8 +103,6 @@ reshape_r10 (gfc_array_r10 * 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/generated/reshape_r16.c b/libgfortran/generated/reshape_r16.c
index a83f62468248..3f260c11ed10 100644
--- a/libgfortran/generated/reshape_r16.c
+++ b/libgfortran/generated/reshape_r16.c
@@ -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).
@@ -84,15 +84,6 @@ reshape_r16 (gfc_array_r16 * 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;
@@ -112,8 +103,6 @@ reshape_r16 (gfc_array_r16 * 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/generated/shape_i16.c b/libgfortran/generated/shape_i16.c
index 30209d5de9ad..58b59098cae8 100644
--- a/libgfortran/generated/shape_i16.c
+++ b/libgfortran/generated/shape_i16.c
@@ -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).
@@ -47,8 +47,6 @@ shape_16 (gfc_array_i16 * 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/generated/shape_i4.c b/libgfortran/generated/shape_i4.c
index d4b323a3cb67..5a7aa03bced4 100644
--- a/libgfortran/generated/shape_i4.c
+++ b/libgfortran/generated/shape_i4.c
@@ -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).
@@ -47,8 +47,6 @@ shape_4 (gfc_array_i4 * 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/generated/shape_i8.c b/libgfortran/generated/shape_i8.c
index acf925fd8b99..e3e2bf538b91 100644
--- a/libgfortran/generated/shape_i8.c
+++ b/libgfortran/generated/shape_i8.c
@@ -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).
@@ -47,8 +47,6 @@ shape_8 (gfc_array_i8 * 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/generated/sum_c10.c b/libgfortran/generated/sum_c10.c
index 344fd3ff386b..7bd3b79a3200 100644
--- a/libgfortran/generated/sum_c10.c
+++ b/libgfortran/generated/sum_c10.c
@@ -62,11 +62,6 @@ sum_c10 (gfc_array_c10 * 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;
 
@@ -103,9 +98,6 @@ sum_c10 (gfc_array_c10 * 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");
     }
@@ -202,14 +194,6 @@ msum_c10 (gfc_array_c10 * 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;
-
-  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;
@@ -251,9 +235,6 @@ msum_c10 (gfc_array_c10 * 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");
     }
@@ -379,9 +360,6 @@ ssum_c10 (gfc_array_c10 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/sum_c16.c b/libgfortran/generated/sum_c16.c
index 8cdf9766c53a..a5f66c5925ab 100644
--- a/libgfortran/generated/sum_c16.c
+++ b/libgfortran/generated/sum_c16.c
@@ -62,11 +62,6 @@ sum_c16 (gfc_array_c16 * 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;
 
@@ -103,9 +98,6 @@ sum_c16 (gfc_array_c16 * 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");
     }
@@ -202,14 +194,6 @@ msum_c16 (gfc_array_c16 * 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;
-
-  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;
@@ -251,9 +235,6 @@ msum_c16 (gfc_array_c16 * 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");
     }
@@ -379,9 +360,6 @@ ssum_c16 (gfc_array_c16 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/sum_c4.c b/libgfortran/generated/sum_c4.c
index 1e113ad85ce9..17d9e9117043 100644
--- a/libgfortran/generated/sum_c4.c
+++ b/libgfortran/generated/sum_c4.c
@@ -62,11 +62,6 @@ sum_c4 (gfc_array_c4 * 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;
 
@@ -103,9 +98,6 @@ sum_c4 (gfc_array_c4 * 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");
     }
@@ -202,14 +194,6 @@ msum_c4 (gfc_array_c4 * 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;
-
-  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;
@@ -251,9 +235,6 @@ msum_c4 (gfc_array_c4 * 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");
     }
@@ -379,9 +360,6 @@ ssum_c4 (gfc_array_c4 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/sum_c8.c b/libgfortran/generated/sum_c8.c
index eec1b783826f..d5bd3aa029cf 100644
--- a/libgfortran/generated/sum_c8.c
+++ b/libgfortran/generated/sum_c8.c
@@ -62,11 +62,6 @@ sum_c8 (gfc_array_c8 * 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;
 
@@ -103,9 +98,6 @@ sum_c8 (gfc_array_c8 * 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");
     }
@@ -202,14 +194,6 @@ msum_c8 (gfc_array_c8 * 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;
-
-  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;
@@ -251,9 +235,6 @@ msum_c8 (gfc_array_c8 * 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");
     }
@@ -379,9 +360,6 @@ ssum_c8 (gfc_array_c8 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/sum_i16.c b/libgfortran/generated/sum_i16.c
index 2a378361ff3d..33911ebd6f05 100644
--- a/libgfortran/generated/sum_i16.c
+++ b/libgfortran/generated/sum_i16.c
@@ -62,11 +62,6 @@ sum_i16 (gfc_array_i16 * 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;
 
@@ -103,9 +98,6 @@ sum_i16 (gfc_array_i16 * 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");
     }
@@ -202,14 +194,6 @@ msum_i16 (gfc_array_i16 * 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;
-
-  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;
@@ -251,9 +235,6 @@ msum_i16 (gfc_array_i16 * 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");
     }
@@ -379,9 +360,6 @@ ssum_i16 (gfc_array_i16 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/sum_i4.c b/libgfortran/generated/sum_i4.c
index 4062a3bbe15a..03d7ce20dcca 100644
--- a/libgfortran/generated/sum_i4.c
+++ b/libgfortran/generated/sum_i4.c
@@ -62,11 +62,6 @@ sum_i4 (gfc_array_i4 * 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;
 
@@ -103,9 +98,6 @@ sum_i4 (gfc_array_i4 * 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");
     }
@@ -202,14 +194,6 @@ msum_i4 (gfc_array_i4 * 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;
-
-  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;
@@ -251,9 +235,6 @@ msum_i4 (gfc_array_i4 * 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");
     }
@@ -379,9 +360,6 @@ ssum_i4 (gfc_array_i4 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/sum_i8.c b/libgfortran/generated/sum_i8.c
index ce02c0634885..177aae61a33c 100644
--- a/libgfortran/generated/sum_i8.c
+++ b/libgfortran/generated/sum_i8.c
@@ -62,11 +62,6 @@ sum_i8 (gfc_array_i8 * 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;
 
@@ -103,9 +98,6 @@ sum_i8 (gfc_array_i8 * 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");
     }
@@ -202,14 +194,6 @@ msum_i8 (gfc_array_i8 * 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;
-
-  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;
@@ -251,9 +235,6 @@ msum_i8 (gfc_array_i8 * 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");
     }
@@ -379,9 +360,6 @@ ssum_i8 (gfc_array_i8 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/sum_r10.c b/libgfortran/generated/sum_r10.c
index 07f6ae397fc7..87531d313ca0 100644
--- a/libgfortran/generated/sum_r10.c
+++ b/libgfortran/generated/sum_r10.c
@@ -62,11 +62,6 @@ sum_r10 (gfc_array_r10 * 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;
 
@@ -103,9 +98,6 @@ sum_r10 (gfc_array_r10 * 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");
     }
@@ -202,14 +194,6 @@ msum_r10 (gfc_array_r10 * 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;
-
-  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;
@@ -251,9 +235,6 @@ msum_r10 (gfc_array_r10 * 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");
     }
@@ -379,9 +360,6 @@ ssum_r10 (gfc_array_r10 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/sum_r16.c b/libgfortran/generated/sum_r16.c
index 975bc2585360..ea59713ca703 100644
--- a/libgfortran/generated/sum_r16.c
+++ b/libgfortran/generated/sum_r16.c
@@ -62,11 +62,6 @@ sum_r16 (gfc_array_r16 * 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;
 
@@ -103,9 +98,6 @@ sum_r16 (gfc_array_r16 * 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");
     }
@@ -202,14 +194,6 @@ msum_r16 (gfc_array_r16 * 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;
-
-  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;
@@ -251,9 +235,6 @@ msum_r16 (gfc_array_r16 * 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");
     }
@@ -379,9 +360,6 @@ ssum_r16 (gfc_array_r16 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/sum_r4.c b/libgfortran/generated/sum_r4.c
index db905ae4c134..2c4441d11c9a 100644
--- a/libgfortran/generated/sum_r4.c
+++ b/libgfortran/generated/sum_r4.c
@@ -62,11 +62,6 @@ sum_r4 (gfc_array_r4 * 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;
 
@@ -103,9 +98,6 @@ sum_r4 (gfc_array_r4 * 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");
     }
@@ -202,14 +194,6 @@ msum_r4 (gfc_array_r4 * 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;
-
-  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;
@@ -251,9 +235,6 @@ msum_r4 (gfc_array_r4 * 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");
     }
@@ -379,9 +360,6 @@ ssum_r4 (gfc_array_r4 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/sum_r8.c b/libgfortran/generated/sum_r8.c
index ed2440be39a3..6a68db052435 100644
--- a/libgfortran/generated/sum_r8.c
+++ b/libgfortran/generated/sum_r8.c
@@ -62,11 +62,6 @@ sum_r8 (gfc_array_r8 * 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;
 
@@ -103,9 +98,6 @@ sum_r8 (gfc_array_r8 * 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");
     }
@@ -202,14 +194,6 @@ msum_r8 (gfc_array_r8 * 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;
-
-  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;
@@ -251,9 +235,6 @@ msum_r8 (gfc_array_r8 * 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");
     }
@@ -379,9 +360,6 @@ ssum_r8 (gfc_array_r8 * 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;
     }
 
     dstride = retarray->dim[0].stride;
diff --git a/libgfortran/generated/transpose_c10.c b/libgfortran/generated/transpose_c10.c
index 9400c82fc187..aec76c647eaf 100644
--- a/libgfortran/generated/transpose_c10.c
+++ b/libgfortran/generated/transpose_c10.c
@@ -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).
@@ -71,11 +71,6 @@ transpose_c10 (gfc_array_c10 * 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;
diff --git a/libgfortran/generated/transpose_c16.c b/libgfortran/generated/transpose_c16.c
index a572be3859d0..62d916580212 100644
--- a/libgfortran/generated/transpose_c16.c
+++ b/libgfortran/generated/transpose_c16.c
@@ -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).
@@ -71,11 +71,6 @@ transpose_c16 (gfc_array_c16 * 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;
diff --git a/libgfortran/generated/transpose_c4.c b/libgfortran/generated/transpose_c4.c
index 3dc14756dbbd..ac4316c930ef 100644
--- a/libgfortran/generated/transpose_c4.c
+++ b/libgfortran/generated/transpose_c4.c
@@ -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).
@@ -71,11 +71,6 @@ transpose_c4 (gfc_array_c4 * 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;
diff --git a/libgfortran/generated/transpose_c8.c b/libgfortran/generated/transpose_c8.c
index c127d947f562..401874a8d869 100644
--- a/libgfortran/generated/transpose_c8.c
+++ b/libgfortran/generated/transpose_c8.c
@@ -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).
@@ -71,11 +71,6 @@ transpose_c8 (gfc_array_c8 * 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;
diff --git a/libgfortran/generated/transpose_i16.c b/libgfortran/generated/transpose_i16.c
index d780fb12c4f2..f47a0ee4b443 100644
--- a/libgfortran/generated/transpose_i16.c
+++ b/libgfortran/generated/transpose_i16.c
@@ -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).
@@ -71,11 +71,6 @@ transpose_i16 (gfc_array_i16 * 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;
diff --git a/libgfortran/generated/transpose_i4.c b/libgfortran/generated/transpose_i4.c
index cf2bfc7ee87b..23ed03ff22df 100644
--- a/libgfortran/generated/transpose_i4.c
+++ b/libgfortran/generated/transpose_i4.c
@@ -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).
@@ -71,11 +71,6 @@ transpose_i4 (gfc_array_i4 * 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;
diff --git a/libgfortran/generated/transpose_i8.c b/libgfortran/generated/transpose_i8.c
index 4fd16648729a..3972032e6629 100644
--- a/libgfortran/generated/transpose_i8.c
+++ b/libgfortran/generated/transpose_i8.c
@@ -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).
@@ -71,11 +71,6 @@ transpose_i8 (gfc_array_i8 * 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;
diff --git a/libgfortran/generated/transpose_r10.c b/libgfortran/generated/transpose_r10.c
index 9a588b841236..97a988ceea3c 100644
--- a/libgfortran/generated/transpose_r10.c
+++ b/libgfortran/generated/transpose_r10.c
@@ -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).
@@ -71,11 +71,6 @@ transpose_r10 (gfc_array_r10 * 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;
diff --git a/libgfortran/generated/transpose_r16.c b/libgfortran/generated/transpose_r16.c
index 797f3c2e557a..ba4c09e74702 100644
--- a/libgfortran/generated/transpose_r16.c
+++ b/libgfortran/generated/transpose_r16.c
@@ -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).
@@ -71,11 +71,6 @@ transpose_r16 (gfc_array_r16 * 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;
diff --git a/libgfortran/intrinsics/etime.c b/libgfortran/intrinsics/etime.c
index 547e10fb3b10..6263d4d0ee57 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 d77a381583c7..9ea2889fd252 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 8cbdc89c0e2f..4f05416500fc 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 bdcc0d11c127..cbc5c4985dff 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 ac91204522ee..ab134ab4b180 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 bd47073790b5..1daae8bb5b78 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;
diff --git a/libgfortran/m4/iforeach.m4 b/libgfortran/m4/iforeach.m4
index 7d20213e9aad..6ff9427722e3 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 d1a34da00b16..74ae6a5d5e47 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 cb5be529e7cb..950919d07828 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 131eb5d842a5..d6ee7c6f7381 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 526303c9f394..f83837b77a96 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 5acb4cb06cdb..f880199eb1a6 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 5b652b64c589..569b413028c0 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 e46c3dd7f918..a219a8bb32a5 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 98926607f993..1511258a1ded 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;
-- 
GitLab