diff options
Diffstat (limited to 'libgfortran')
237 files changed, 2408 insertions, 321 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index ab0dd21..6df47da 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,245 @@ +2018-12-31 Thomas Koenig <tkoenig@gcc.gnu.org> + + PR fortran/82995 + * m4/ifindloc0.m4: Handle case of absend optional argument, passed + as a NULL pointer. Correct allocation of retarray->base_addr. + * m4/ifindloc1.m4: Likewise. + * m4/ifindloc2.m4: Handle case of absend optional argument, passed + as a NULL pointer. + * m4/iforeach-s.m4: Likewise. + * m4/iforeach-s2.m4: Likewise. + * m4/iforeach.m4: Likewise. + * m4/ifunction-s.m4: Likewise. + * m4/ifunction-s2.m4: Likewise. + * m4/ifunction.m4: Likewise. + * generated/findloc0_c16.c: Regenerated. + * generated/findloc0_c4.c: Regenerated. + * generated/findloc0_c8.c: Regenerated. + * generated/findloc0_i1.c: Regenerated. + * generated/findloc0_i16.c: Regenerated. + * generated/findloc0_i2.c: Regenerated. + * generated/findloc0_i4.c: Regenerated. + * generated/findloc0_i8.c: Regenerated. + * generated/findloc0_r16.c: Regenerated. + * generated/findloc0_r4.c: Regenerated. + * generated/findloc0_r8.c: Regenerated. + * generated/findloc0_s1.c: Regenerated. + * generated/findloc0_s4.c: Regenerated. + * generated/findloc1_c16.c: Regenerated. + * generated/findloc1_c4.c: Regenerated. + * generated/findloc1_c8.c: Regenerated. + * generated/findloc1_i1.c: Regenerated. + * generated/findloc1_i16.c: Regenerated. + * generated/findloc1_i2.c: Regenerated. + * generated/findloc1_i4.c: Regenerated. + * generated/findloc1_i8.c: Regenerated. + * generated/findloc1_r16.c: Regenerated. + * generated/findloc1_r4.c: Regenerated. + * generated/findloc1_r8.c: Regenerated. + * generated/findloc1_s1.c: Regenerated. + * generated/findloc1_s4.c: Regenerated. + * generated/findloc2_s1.c: Regenerated. + * generated/findloc2_s4.c: Regenerated. + * generated/iall_i1.c: Regenerated. + * generated/iall_i16.c: Regenerated. + * generated/iall_i2.c: Regenerated. + * generated/iall_i4.c: Regenerated. + * generated/iall_i8.c: Regenerated. + * generated/iany_i1.c: Regenerated. + * generated/iany_i16.c: Regenerated. + * generated/iany_i2.c: Regenerated. + * generated/iany_i4.c: Regenerated. + * generated/iany_i8.c: Regenerated. + * generated/iparity_i1.c: Regenerated. + * generated/iparity_i16.c: Regenerated. + * generated/iparity_i2.c: Regenerated. + * generated/iparity_i4.c: Regenerated. + * generated/iparity_i8.c: Regenerated. + * generated/maxloc0_16_i1.c: Regenerated. + * generated/maxloc0_16_i16.c: Regenerated. + * generated/maxloc0_16_i2.c: Regenerated. + * generated/maxloc0_16_i4.c: Regenerated. + * generated/maxloc0_16_i8.c: Regenerated. + * generated/maxloc0_16_r10.c: Regenerated. + * generated/maxloc0_16_r16.c: Regenerated. + * generated/maxloc0_16_r4.c: Regenerated. + * generated/maxloc0_16_r8.c: Regenerated. + * generated/maxloc0_16_s1.c: Regenerated. + * generated/maxloc0_16_s4.c: Regenerated. + * generated/maxloc0_4_i1.c: Regenerated. + * generated/maxloc0_4_i16.c: Regenerated. + * generated/maxloc0_4_i2.c: Regenerated. + * generated/maxloc0_4_i4.c: Regenerated. + * generated/maxloc0_4_i8.c: Regenerated. + * generated/maxloc0_4_r10.c: Regenerated. + * generated/maxloc0_4_r16.c: Regenerated. + * generated/maxloc0_4_r4.c: Regenerated. + * generated/maxloc0_4_r8.c: Regenerated. + * generated/maxloc0_4_s1.c: Regenerated. + * generated/maxloc0_4_s4.c: Regenerated. + * generated/maxloc0_8_i1.c: Regenerated. + * generated/maxloc0_8_i16.c: Regenerated. + * generated/maxloc0_8_i2.c: Regenerated. + * generated/maxloc0_8_i4.c: Regenerated. + * generated/maxloc0_8_i8.c: Regenerated. + * generated/maxloc0_8_r10.c: Regenerated. + * generated/maxloc0_8_r16.c: Regenerated. + * generated/maxloc0_8_r4.c: Regenerated. + * generated/maxloc0_8_r8.c: Regenerated. + * generated/maxloc0_8_s1.c: Regenerated. + * generated/maxloc0_8_s4.c: Regenerated. + * generated/maxloc1_16_i1.c: Regenerated. + * generated/maxloc1_16_i16.c: Regenerated. + * generated/maxloc1_16_i2.c: Regenerated. + * generated/maxloc1_16_i4.c: Regenerated. + * generated/maxloc1_16_i8.c: Regenerated. + * generated/maxloc1_16_r10.c: Regenerated. + * generated/maxloc1_16_r16.c: Regenerated. + * generated/maxloc1_16_r4.c: Regenerated. + * generated/maxloc1_16_r8.c: Regenerated. + * generated/maxloc1_16_s1.c: Regenerated. + * generated/maxloc1_16_s4.c: Regenerated. + * generated/maxloc1_4_i1.c: Regenerated. + * generated/maxloc1_4_i16.c: Regenerated. + * generated/maxloc1_4_i2.c: Regenerated. + * generated/maxloc1_4_i4.c: Regenerated. + * generated/maxloc1_4_i8.c: Regenerated. + * generated/maxloc1_4_r10.c: Regenerated. + * generated/maxloc1_4_r16.c: Regenerated. + * generated/maxloc1_4_r4.c: Regenerated. + * generated/maxloc1_4_r8.c: Regenerated. + * generated/maxloc1_4_s1.c: Regenerated. + * generated/maxloc1_4_s4.c: Regenerated. + * generated/maxloc1_8_i1.c: Regenerated. + * generated/maxloc1_8_i16.c: Regenerated. + * generated/maxloc1_8_i2.c: Regenerated. + * generated/maxloc1_8_i4.c: Regenerated. + * generated/maxloc1_8_i8.c: Regenerated. + * generated/maxloc1_8_r10.c: Regenerated. + * generated/maxloc1_8_r16.c: Regenerated. + * generated/maxloc1_8_r4.c: Regenerated. + * generated/maxloc1_8_r8.c: Regenerated. + * generated/maxloc1_8_s1.c: Regenerated. + * generated/maxloc1_8_s4.c: Regenerated. + * generated/maxval0_s1.c: Regenerated. + * generated/maxval0_s4.c: Regenerated. + * generated/maxval1_s1.c: Regenerated. + * generated/maxval1_s4.c: Regenerated. + * generated/maxval_i1.c: Regenerated. + * generated/maxval_i16.c: Regenerated. + * generated/maxval_i2.c: Regenerated. + * generated/maxval_i4.c: Regenerated. + * generated/maxval_i8.c: Regenerated. + * generated/maxval_r10.c: Regenerated. + * generated/maxval_r16.c: Regenerated. + * generated/maxval_r4.c: Regenerated. + * generated/maxval_r8.c: Regenerated. + * generated/minloc0_16_i1.c: Regenerated. + * generated/minloc0_16_i16.c: Regenerated. + * generated/minloc0_16_i2.c: Regenerated. + * generated/minloc0_16_i4.c: Regenerated. + * generated/minloc0_16_i8.c: Regenerated. + * generated/minloc0_16_r10.c: Regenerated. + * generated/minloc0_16_r16.c: Regenerated. + * generated/minloc0_16_r4.c: Regenerated. + * generated/minloc0_16_r8.c: Regenerated. + * generated/minloc0_16_s1.c: Regenerated. + * generated/minloc0_16_s4.c: Regenerated. + * generated/minloc0_4_i1.c: Regenerated. + * generated/minloc0_4_i16.c: Regenerated. + * generated/minloc0_4_i2.c: Regenerated. + * generated/minloc0_4_i4.c: Regenerated. + * generated/minloc0_4_i8.c: Regenerated. + * generated/minloc0_4_r10.c: Regenerated. + * generated/minloc0_4_r16.c: Regenerated. + * generated/minloc0_4_r4.c: Regenerated. + * generated/minloc0_4_r8.c: Regenerated. + * generated/minloc0_4_s1.c: Regenerated. + * generated/minloc0_4_s4.c: Regenerated. + * generated/minloc0_8_i1.c: Regenerated. + * generated/minloc0_8_i16.c: Regenerated. + * generated/minloc0_8_i2.c: Regenerated. + * generated/minloc0_8_i4.c: Regenerated. + * generated/minloc0_8_i8.c: Regenerated. + * generated/minloc0_8_r10.c: Regenerated. + * generated/minloc0_8_r16.c: Regenerated. + * generated/minloc0_8_r4.c: Regenerated. + * generated/minloc0_8_r8.c: Regenerated. + * generated/minloc0_8_s1.c: Regenerated. + * generated/minloc0_8_s4.c: Regenerated. + * generated/minloc1_16_i1.c: Regenerated. + * generated/minloc1_16_i16.c: Regenerated. + * generated/minloc1_16_i2.c: Regenerated. + * generated/minloc1_16_i4.c: Regenerated. + * generated/minloc1_16_i8.c: Regenerated. + * generated/minloc1_16_r10.c: Regenerated. + * generated/minloc1_16_r16.c: Regenerated. + * generated/minloc1_16_r4.c: Regenerated. + * generated/minloc1_16_r8.c: Regenerated. + * generated/minloc1_16_s1.c: Regenerated. + * generated/minloc1_16_s4.c: Regenerated. + * generated/minloc1_4_i1.c: Regenerated. + * generated/minloc1_4_i16.c: Regenerated. + * generated/minloc1_4_i2.c: Regenerated. + * generated/minloc1_4_i4.c: Regenerated. + * generated/minloc1_4_i8.c: Regenerated. + * generated/minloc1_4_r10.c: Regenerated. + * generated/minloc1_4_r16.c: Regenerated. + * generated/minloc1_4_r4.c: Regenerated. + * generated/minloc1_4_r8.c: Regenerated. + * generated/minloc1_4_s1.c: Regenerated. + * generated/minloc1_4_s4.c: Regenerated. + * generated/minloc1_8_i1.c: Regenerated. + * generated/minloc1_8_i16.c: Regenerated. + * generated/minloc1_8_i2.c: Regenerated. + * generated/minloc1_8_i4.c: Regenerated. + * generated/minloc1_8_i8.c: Regenerated. + * generated/minloc1_8_r10.c: Regenerated. + * generated/minloc1_8_r16.c: Regenerated. + * generated/minloc1_8_r4.c: Regenerated. + * generated/minloc1_8_r8.c: Regenerated. + * generated/minloc1_8_s1.c: Regenerated. + * generated/minloc1_8_s4.c: Regenerated. + * generated/minval0_s1.c: Regenerated. + * generated/minval0_s4.c: Regenerated. + * generated/minval1_s1.c: Regenerated. + * generated/minval1_s4.c: Regenerated. + * generated/minval_i1.c: Regenerated. + * generated/minval_i16.c: Regenerated. + * generated/minval_i2.c: Regenerated. + * generated/minval_i4.c: Regenerated. + * generated/minval_i8.c: Regenerated. + * generated/minval_r10.c: Regenerated. + * generated/minval_r16.c: Regenerated. + * generated/minval_r4.c: Regenerated. + * generated/minval_r8.c: Regenerated. + * generated/product_c10.c: Regenerated. + * generated/product_c16.c: Regenerated. + * generated/product_c4.c: Regenerated. + * generated/product_c8.c: Regenerated. + * generated/product_i1.c: Regenerated. + * generated/product_i16.c: Regenerated. + * generated/product_i2.c: Regenerated. + * generated/product_i4.c: Regenerated. + * generated/product_i8.c: Regenerated. + * generated/product_r10.c: Regenerated. + * generated/product_r16.c: Regenerated. + * generated/product_r4.c: Regenerated. + * generated/product_r8.c: Regenerated. + * generated/sum_c10.c: Regenerated. + * generated/sum_c16.c: Regenerated. + * generated/sum_c4.c: Regenerated. + * generated/sum_c8.c: Regenerated. + * generated/sum_i1.c: Regenerated. + * generated/sum_i16.c: Regenerated. + * generated/sum_i2.c: Regenerated. + * generated/sum_i4.c: Regenerated. + * generated/sum_i8.c: Regenerated. + * generated/sum_r10.c: Regenerated. + * generated/sum_r16.c: Regenerated. + * generated/sum_r4.c: Regenerated. + * generated/sum_r8.c: Regenerated. + 2018-12-29 Steven G. Kargl <kargl@gcc.gnu.org> * gfortran.map: Expose subnormal functions in dynamic library. @@ -7,7 +249,7 @@ * ieee/ieee_features.F90: Add IEEE_SUBNORMAL. 2018-12-29 Steven G. Kargl <kargl@gcc.gnu.org> - + PR fortran/88342 * ieee/ieee_arithmetic.F90: Prevent exceptions in IEEE_VALUE if -ffpe-trap=invalid or -ffpe-trap=overflow is used. diff --git a/libgfortran/generated/findloc0_c16.c b/libgfortran/generated/findloc0_c16.c index 8afb0c5..9bbed7b 100644 --- a/libgfortran/generated/findloc0_c16.c +++ b/libgfortran/generated/findloc0_c16.c @@ -57,7 +57,7 @@ findloc0_c16 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else { @@ -196,7 +196,7 @@ mfindloc0_c16 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else { @@ -342,7 +342,7 @@ sfindloc0_c16 (gfc_array_index_type * const restrict retarray, index_type * restrict dest; index_type n; - if (*mask) + if (mask == NULL || *mask) { findloc0_c16 (retarray, array, value, back); return; @@ -358,7 +358,7 @@ sfindloc0_c16 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else if (unlikely (compile_options.bounds_check)) { diff --git a/libgfortran/generated/findloc0_c4.c b/libgfortran/generated/findloc0_c4.c index 42f010b..3a14178 100644 --- a/libgfortran/generated/findloc0_c4.c +++ b/libgfortran/generated/findloc0_c4.c @@ -57,7 +57,7 @@ findloc0_c4 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else { @@ -196,7 +196,7 @@ mfindloc0_c4 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else { @@ -342,7 +342,7 @@ sfindloc0_c4 (gfc_array_index_type * const restrict retarray, index_type * restrict dest; index_type n; - if (*mask) + if (mask == NULL || *mask) { findloc0_c4 (retarray, array, value, back); return; @@ -358,7 +358,7 @@ sfindloc0_c4 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else if (unlikely (compile_options.bounds_check)) { diff --git a/libgfortran/generated/findloc0_c8.c b/libgfortran/generated/findloc0_c8.c index 8eb7303..c67eba5 100644 --- a/libgfortran/generated/findloc0_c8.c +++ b/libgfortran/generated/findloc0_c8.c @@ -57,7 +57,7 @@ findloc0_c8 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else { @@ -196,7 +196,7 @@ mfindloc0_c8 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else { @@ -342,7 +342,7 @@ sfindloc0_c8 (gfc_array_index_type * const restrict retarray, index_type * restrict dest; index_type n; - if (*mask) + if (mask == NULL || *mask) { findloc0_c8 (retarray, array, value, back); return; @@ -358,7 +358,7 @@ sfindloc0_c8 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else if (unlikely (compile_options.bounds_check)) { diff --git a/libgfortran/generated/findloc0_i1.c b/libgfortran/generated/findloc0_i1.c index 76b5400a..4a21934 100644 --- a/libgfortran/generated/findloc0_i1.c +++ b/libgfortran/generated/findloc0_i1.c @@ -57,7 +57,7 @@ findloc0_i1 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else { @@ -196,7 +196,7 @@ mfindloc0_i1 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else { @@ -342,7 +342,7 @@ sfindloc0_i1 (gfc_array_index_type * const restrict retarray, index_type * restrict dest; index_type n; - if (*mask) + if (mask == NULL || *mask) { findloc0_i1 (retarray, array, value, back); return; @@ -358,7 +358,7 @@ sfindloc0_i1 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else if (unlikely (compile_options.bounds_check)) { diff --git a/libgfortran/generated/findloc0_i16.c b/libgfortran/generated/findloc0_i16.c index bdfd69a..662df29 100644 --- a/libgfortran/generated/findloc0_i16.c +++ b/libgfortran/generated/findloc0_i16.c @@ -57,7 +57,7 @@ findloc0_i16 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else { @@ -196,7 +196,7 @@ mfindloc0_i16 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else { @@ -342,7 +342,7 @@ sfindloc0_i16 (gfc_array_index_type * const restrict retarray, index_type * restrict dest; index_type n; - if (*mask) + if (mask == NULL || *mask) { findloc0_i16 (retarray, array, value, back); return; @@ -358,7 +358,7 @@ sfindloc0_i16 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else if (unlikely (compile_options.bounds_check)) { diff --git a/libgfortran/generated/findloc0_i2.c b/libgfortran/generated/findloc0_i2.c index 712262f..273248c 100644 --- a/libgfortran/generated/findloc0_i2.c +++ b/libgfortran/generated/findloc0_i2.c @@ -57,7 +57,7 @@ findloc0_i2 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else { @@ -196,7 +196,7 @@ mfindloc0_i2 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else { @@ -342,7 +342,7 @@ sfindloc0_i2 (gfc_array_index_type * const restrict retarray, index_type * restrict dest; index_type n; - if (*mask) + if (mask == NULL || *mask) { findloc0_i2 (retarray, array, value, back); return; @@ -358,7 +358,7 @@ sfindloc0_i2 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else if (unlikely (compile_options.bounds_check)) { diff --git a/libgfortran/generated/findloc0_i4.c b/libgfortran/generated/findloc0_i4.c index db72489..0eb611b 100644 --- a/libgfortran/generated/findloc0_i4.c +++ b/libgfortran/generated/findloc0_i4.c @@ -57,7 +57,7 @@ findloc0_i4 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else { @@ -196,7 +196,7 @@ mfindloc0_i4 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else { @@ -342,7 +342,7 @@ sfindloc0_i4 (gfc_array_index_type * const restrict retarray, index_type * restrict dest; index_type n; - if (*mask) + if (mask == NULL || *mask) { findloc0_i4 (retarray, array, value, back); return; @@ -358,7 +358,7 @@ sfindloc0_i4 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else if (unlikely (compile_options.bounds_check)) { diff --git a/libgfortran/generated/findloc0_i8.c b/libgfortran/generated/findloc0_i8.c index 6fb3e2c..ef48de0 100644 --- a/libgfortran/generated/findloc0_i8.c +++ b/libgfortran/generated/findloc0_i8.c @@ -57,7 +57,7 @@ findloc0_i8 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else { @@ -196,7 +196,7 @@ mfindloc0_i8 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else { @@ -342,7 +342,7 @@ sfindloc0_i8 (gfc_array_index_type * const restrict retarray, index_type * restrict dest; index_type n; - if (*mask) + if (mask == NULL || *mask) { findloc0_i8 (retarray, array, value, back); return; @@ -358,7 +358,7 @@ sfindloc0_i8 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else if (unlikely (compile_options.bounds_check)) { diff --git a/libgfortran/generated/findloc0_r16.c b/libgfortran/generated/findloc0_r16.c index 23ecd98..ca3c750 100644 --- a/libgfortran/generated/findloc0_r16.c +++ b/libgfortran/generated/findloc0_r16.c @@ -57,7 +57,7 @@ findloc0_r16 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else { @@ -196,7 +196,7 @@ mfindloc0_r16 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else { @@ -342,7 +342,7 @@ sfindloc0_r16 (gfc_array_index_type * const restrict retarray, index_type * restrict dest; index_type n; - if (*mask) + if (mask == NULL || *mask) { findloc0_r16 (retarray, array, value, back); return; @@ -358,7 +358,7 @@ sfindloc0_r16 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else if (unlikely (compile_options.bounds_check)) { diff --git a/libgfortran/generated/findloc0_r4.c b/libgfortran/generated/findloc0_r4.c index 08d59e9..f1dd1c3 100644 --- a/libgfortran/generated/findloc0_r4.c +++ b/libgfortran/generated/findloc0_r4.c @@ -57,7 +57,7 @@ findloc0_r4 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else { @@ -196,7 +196,7 @@ mfindloc0_r4 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else { @@ -342,7 +342,7 @@ sfindloc0_r4 (gfc_array_index_type * const restrict retarray, index_type * restrict dest; index_type n; - if (*mask) + if (mask == NULL || *mask) { findloc0_r4 (retarray, array, value, back); return; @@ -358,7 +358,7 @@ sfindloc0_r4 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else if (unlikely (compile_options.bounds_check)) { diff --git a/libgfortran/generated/findloc0_r8.c b/libgfortran/generated/findloc0_r8.c index c731531..31e39b0 100644 --- a/libgfortran/generated/findloc0_r8.c +++ b/libgfortran/generated/findloc0_r8.c @@ -57,7 +57,7 @@ findloc0_r8 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else { @@ -196,7 +196,7 @@ mfindloc0_r8 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else { @@ -342,7 +342,7 @@ sfindloc0_r8 (gfc_array_index_type * const restrict retarray, index_type * restrict dest; index_type n; - if (*mask) + if (mask == NULL || *mask) { findloc0_r8 (retarray, array, value, back); return; @@ -358,7 +358,7 @@ sfindloc0_r8 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else if (unlikely (compile_options.bounds_check)) { diff --git a/libgfortran/generated/findloc0_s1.c b/libgfortran/generated/findloc0_s1.c index 3b0f9b0..e42c44a 100644 --- a/libgfortran/generated/findloc0_s1.c +++ b/libgfortran/generated/findloc0_s1.c @@ -58,7 +58,7 @@ findloc0_s1 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else { @@ -199,7 +199,7 @@ mfindloc0_s1 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else { @@ -347,7 +347,7 @@ sfindloc0_s1 (gfc_array_index_type * const restrict retarray, index_type * restrict dest; index_type n; - if (*mask) + if (mask == NULL || *mask) { findloc0_s1 (retarray, array, value, back, len_array, len_value); return; @@ -363,7 +363,7 @@ sfindloc0_s1 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else if (unlikely (compile_options.bounds_check)) { diff --git a/libgfortran/generated/findloc0_s4.c b/libgfortran/generated/findloc0_s4.c index fa23503..bdf71c5 100644 --- a/libgfortran/generated/findloc0_s4.c +++ b/libgfortran/generated/findloc0_s4.c @@ -58,7 +58,7 @@ findloc0_s4 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else { @@ -199,7 +199,7 @@ mfindloc0_s4 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else { @@ -347,7 +347,7 @@ sfindloc0_s4 (gfc_array_index_type * const restrict retarray, index_type * restrict dest; index_type n; - if (*mask) + if (mask == NULL || *mask) { findloc0_s4 (retarray, array, value, back, len_array, len_value); return; @@ -363,7 +363,7 @@ sfindloc0_s4 (gfc_array_index_type * const restrict retarray, GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else if (unlikely (compile_options.bounds_check)) { diff --git a/libgfortran/generated/findloc1_c16.c b/libgfortran/generated/findloc1_c16.c index 3c03c0b..448994e 100644 --- a/libgfortran/generated/findloc1_c16.c +++ b/libgfortran/generated/findloc1_c16.c @@ -103,7 +103,7 @@ findloc1_c16 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ @@ -291,7 +291,7 @@ mfindloc1_c16 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ @@ -407,7 +407,7 @@ sfindloc1_c16 (gfc_array_index_type * const restrict retarray, index_type dim; bool continue_loop; - if (*mask) + if (mask == NULL || *mask) { findloc1_c16 (retarray, array, value, pdim, back); return; @@ -464,7 +464,7 @@ sfindloc1_c16 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ diff --git a/libgfortran/generated/findloc1_c4.c b/libgfortran/generated/findloc1_c4.c index 6355e2b..5f88289 100644 --- a/libgfortran/generated/findloc1_c4.c +++ b/libgfortran/generated/findloc1_c4.c @@ -103,7 +103,7 @@ findloc1_c4 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ @@ -291,7 +291,7 @@ mfindloc1_c4 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ @@ -407,7 +407,7 @@ sfindloc1_c4 (gfc_array_index_type * const restrict retarray, index_type dim; bool continue_loop; - if (*mask) + if (mask == NULL || *mask) { findloc1_c4 (retarray, array, value, pdim, back); return; @@ -464,7 +464,7 @@ sfindloc1_c4 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ diff --git a/libgfortran/generated/findloc1_c8.c b/libgfortran/generated/findloc1_c8.c index dec5172..062eadf 100644 --- a/libgfortran/generated/findloc1_c8.c +++ b/libgfortran/generated/findloc1_c8.c @@ -103,7 +103,7 @@ findloc1_c8 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ @@ -291,7 +291,7 @@ mfindloc1_c8 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ @@ -407,7 +407,7 @@ sfindloc1_c8 (gfc_array_index_type * const restrict retarray, index_type dim; bool continue_loop; - if (*mask) + if (mask == NULL || *mask) { findloc1_c8 (retarray, array, value, pdim, back); return; @@ -464,7 +464,7 @@ sfindloc1_c8 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ diff --git a/libgfortran/generated/findloc1_i1.c b/libgfortran/generated/findloc1_i1.c index 26b497e..35c3d35 100644 --- a/libgfortran/generated/findloc1_i1.c +++ b/libgfortran/generated/findloc1_i1.c @@ -103,7 +103,7 @@ findloc1_i1 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ @@ -291,7 +291,7 @@ mfindloc1_i1 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ @@ -407,7 +407,7 @@ sfindloc1_i1 (gfc_array_index_type * const restrict retarray, index_type dim; bool continue_loop; - if (*mask) + if (mask == NULL || *mask) { findloc1_i1 (retarray, array, value, pdim, back); return; @@ -464,7 +464,7 @@ sfindloc1_i1 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ diff --git a/libgfortran/generated/findloc1_i16.c b/libgfortran/generated/findloc1_i16.c index edb52e2..1e3ecd7 100644 --- a/libgfortran/generated/findloc1_i16.c +++ b/libgfortran/generated/findloc1_i16.c @@ -103,7 +103,7 @@ findloc1_i16 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ @@ -291,7 +291,7 @@ mfindloc1_i16 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ @@ -407,7 +407,7 @@ sfindloc1_i16 (gfc_array_index_type * const restrict retarray, index_type dim; bool continue_loop; - if (*mask) + if (mask == NULL || *mask) { findloc1_i16 (retarray, array, value, pdim, back); return; @@ -464,7 +464,7 @@ sfindloc1_i16 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ diff --git a/libgfortran/generated/findloc1_i2.c b/libgfortran/generated/findloc1_i2.c index 280b7b8..5ba8755 100644 --- a/libgfortran/generated/findloc1_i2.c +++ b/libgfortran/generated/findloc1_i2.c @@ -103,7 +103,7 @@ findloc1_i2 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ @@ -291,7 +291,7 @@ mfindloc1_i2 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ @@ -407,7 +407,7 @@ sfindloc1_i2 (gfc_array_index_type * const restrict retarray, index_type dim; bool continue_loop; - if (*mask) + if (mask == NULL || *mask) { findloc1_i2 (retarray, array, value, pdim, back); return; @@ -464,7 +464,7 @@ sfindloc1_i2 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ diff --git a/libgfortran/generated/findloc1_i4.c b/libgfortran/generated/findloc1_i4.c index a9e3abc..a62bb78 100644 --- a/libgfortran/generated/findloc1_i4.c +++ b/libgfortran/generated/findloc1_i4.c @@ -103,7 +103,7 @@ findloc1_i4 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ @@ -291,7 +291,7 @@ mfindloc1_i4 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ @@ -407,7 +407,7 @@ sfindloc1_i4 (gfc_array_index_type * const restrict retarray, index_type dim; bool continue_loop; - if (*mask) + if (mask == NULL || *mask) { findloc1_i4 (retarray, array, value, pdim, back); return; @@ -464,7 +464,7 @@ sfindloc1_i4 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ diff --git a/libgfortran/generated/findloc1_i8.c b/libgfortran/generated/findloc1_i8.c index 79b5a5a..e25cb24 100644 --- a/libgfortran/generated/findloc1_i8.c +++ b/libgfortran/generated/findloc1_i8.c @@ -103,7 +103,7 @@ findloc1_i8 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ @@ -291,7 +291,7 @@ mfindloc1_i8 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ @@ -407,7 +407,7 @@ sfindloc1_i8 (gfc_array_index_type * const restrict retarray, index_type dim; bool continue_loop; - if (*mask) + if (mask == NULL || *mask) { findloc1_i8 (retarray, array, value, pdim, back); return; @@ -464,7 +464,7 @@ sfindloc1_i8 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ diff --git a/libgfortran/generated/findloc1_r16.c b/libgfortran/generated/findloc1_r16.c index 90f3db0..7fe92d3 100644 --- a/libgfortran/generated/findloc1_r16.c +++ b/libgfortran/generated/findloc1_r16.c @@ -103,7 +103,7 @@ findloc1_r16 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ @@ -291,7 +291,7 @@ mfindloc1_r16 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ @@ -407,7 +407,7 @@ sfindloc1_r16 (gfc_array_index_type * const restrict retarray, index_type dim; bool continue_loop; - if (*mask) + if (mask == NULL || *mask) { findloc1_r16 (retarray, array, value, pdim, back); return; @@ -464,7 +464,7 @@ sfindloc1_r16 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ diff --git a/libgfortran/generated/findloc1_r4.c b/libgfortran/generated/findloc1_r4.c index d573cbb..29204a8 100644 --- a/libgfortran/generated/findloc1_r4.c +++ b/libgfortran/generated/findloc1_r4.c @@ -103,7 +103,7 @@ findloc1_r4 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ @@ -291,7 +291,7 @@ mfindloc1_r4 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ @@ -407,7 +407,7 @@ sfindloc1_r4 (gfc_array_index_type * const restrict retarray, index_type dim; bool continue_loop; - if (*mask) + if (mask == NULL || *mask) { findloc1_r4 (retarray, array, value, pdim, back); return; @@ -464,7 +464,7 @@ sfindloc1_r4 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ diff --git a/libgfortran/generated/findloc1_r8.c b/libgfortran/generated/findloc1_r8.c index 037993c..9c9c410 100644 --- a/libgfortran/generated/findloc1_r8.c +++ b/libgfortran/generated/findloc1_r8.c @@ -103,7 +103,7 @@ findloc1_r8 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ @@ -291,7 +291,7 @@ mfindloc1_r8 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ @@ -407,7 +407,7 @@ sfindloc1_r8 (gfc_array_index_type * const restrict retarray, index_type dim; bool continue_loop; - if (*mask) + if (mask == NULL || *mask) { findloc1_r8 (retarray, array, value, pdim, back); return; @@ -464,7 +464,7 @@ sfindloc1_r8 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ diff --git a/libgfortran/generated/findloc1_s1.c b/libgfortran/generated/findloc1_s1.c index 0b331ac..f9a065b 100644 --- a/libgfortran/generated/findloc1_s1.c +++ b/libgfortran/generated/findloc1_s1.c @@ -105,7 +105,7 @@ findloc1_s1 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ @@ -293,7 +293,7 @@ mfindloc1_s1 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ @@ -409,7 +409,7 @@ sfindloc1_s1 (gfc_array_index_type * const restrict retarray, index_type dim; bool continue_loop; - if (*mask) + if (mask == NULL || *mask) { findloc1_s1 (retarray, array, value, pdim, back, len_array, len_value); return; @@ -466,7 +466,7 @@ sfindloc1_s1 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ diff --git a/libgfortran/generated/findloc1_s4.c b/libgfortran/generated/findloc1_s4.c index 6b42d10..1487d58 100644 --- a/libgfortran/generated/findloc1_s4.c +++ b/libgfortran/generated/findloc1_s4.c @@ -105,7 +105,7 @@ findloc1_s4 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ @@ -293,7 +293,7 @@ mfindloc1_s4 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ @@ -409,7 +409,7 @@ sfindloc1_s4 (gfc_array_index_type * const restrict retarray, index_type dim; bool continue_loop; - if (*mask) + if (mask == NULL || *mask) { findloc1_s4 (retarray, array, value, pdim, back, len_array, len_value); return; @@ -466,7 +466,7 @@ sfindloc1_s4 (gfc_array_index_type * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ diff --git a/libgfortran/generated/findloc2_s1.c b/libgfortran/generated/findloc2_s1.c index bfeca02..9b894a8 100644 --- a/libgfortran/generated/findloc2_s1.c +++ b/libgfortran/generated/findloc2_s1.c @@ -145,7 +145,7 @@ sfindloc2_s1 (gfc_array_s1 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len_array, gfc_charlen_type len_value) { - if (*mask) + if (mask == NULL || *mask) { return findloc2_s1 (array, value, back, len_array, len_value); } diff --git a/libgfortran/generated/findloc2_s4.c b/libgfortran/generated/findloc2_s4.c index 6597b56..7042df5 100644 --- a/libgfortran/generated/findloc2_s4.c +++ b/libgfortran/generated/findloc2_s4.c @@ -145,7 +145,7 @@ sfindloc2_s4 (gfc_array_s4 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len_array, gfc_charlen_type len_value) { - if (*mask) + if (mask == NULL || *mask) { return findloc2_s4 (array, value, back, len_array, len_value); } diff --git a/libgfortran/generated/iall_i1.c b/libgfortran/generated/iall_i1.c index 481b2b0..90e9e8c 100644 --- a/libgfortran/generated/iall_i1.c +++ b/libgfortran/generated/iall_i1.c @@ -220,6 +220,16 @@ miall_i1 (gfc_array_i1 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + iall_i1 (retarray, array, pdim, back); +#else + iall_i1 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ siall_i1 (gfc_array_i1 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG iall_i1 (retarray, array, pdim, back); diff --git a/libgfortran/generated/iall_i16.c b/libgfortran/generated/iall_i16.c index 51e38a5..b87109e 100644 --- a/libgfortran/generated/iall_i16.c +++ b/libgfortran/generated/iall_i16.c @@ -220,6 +220,16 @@ miall_i16 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + iall_i16 (retarray, array, pdim, back); +#else + iall_i16 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ siall_i16 (gfc_array_i16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG iall_i16 (retarray, array, pdim, back); diff --git a/libgfortran/generated/iall_i2.c b/libgfortran/generated/iall_i2.c index 32300e3..7ac579a 100644 --- a/libgfortran/generated/iall_i2.c +++ b/libgfortran/generated/iall_i2.c @@ -220,6 +220,16 @@ miall_i2 (gfc_array_i2 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + iall_i2 (retarray, array, pdim, back); +#else + iall_i2 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ siall_i2 (gfc_array_i2 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG iall_i2 (retarray, array, pdim, back); diff --git a/libgfortran/generated/iall_i4.c b/libgfortran/generated/iall_i4.c index 8083c5a..0ffe50a 100644 --- a/libgfortran/generated/iall_i4.c +++ b/libgfortran/generated/iall_i4.c @@ -220,6 +220,16 @@ miall_i4 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + iall_i4 (retarray, array, pdim, back); +#else + iall_i4 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ siall_i4 (gfc_array_i4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG iall_i4 (retarray, array, pdim, back); diff --git a/libgfortran/generated/iall_i8.c b/libgfortran/generated/iall_i8.c index a337cdb..c9d6688 100644 --- a/libgfortran/generated/iall_i8.c +++ b/libgfortran/generated/iall_i8.c @@ -220,6 +220,16 @@ miall_i8 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + iall_i8 (retarray, array, pdim, back); +#else + iall_i8 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ siall_i8 (gfc_array_i8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG iall_i8 (retarray, array, pdim, back); diff --git a/libgfortran/generated/iany_i1.c b/libgfortran/generated/iany_i1.c index 063d4b2..bbc6954 100644 --- a/libgfortran/generated/iany_i1.c +++ b/libgfortran/generated/iany_i1.c @@ -220,6 +220,16 @@ miany_i1 (gfc_array_i1 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + iany_i1 (retarray, array, pdim, back); +#else + iany_i1 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ siany_i1 (gfc_array_i1 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG iany_i1 (retarray, array, pdim, back); diff --git a/libgfortran/generated/iany_i16.c b/libgfortran/generated/iany_i16.c index bac35d0..f360482 100644 --- a/libgfortran/generated/iany_i16.c +++ b/libgfortran/generated/iany_i16.c @@ -220,6 +220,16 @@ miany_i16 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + iany_i16 (retarray, array, pdim, back); +#else + iany_i16 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ siany_i16 (gfc_array_i16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG iany_i16 (retarray, array, pdim, back); diff --git a/libgfortran/generated/iany_i2.c b/libgfortran/generated/iany_i2.c index ea1ae23..5c462cd 100644 --- a/libgfortran/generated/iany_i2.c +++ b/libgfortran/generated/iany_i2.c @@ -220,6 +220,16 @@ miany_i2 (gfc_array_i2 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + iany_i2 (retarray, array, pdim, back); +#else + iany_i2 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ siany_i2 (gfc_array_i2 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG iany_i2 (retarray, array, pdim, back); diff --git a/libgfortran/generated/iany_i4.c b/libgfortran/generated/iany_i4.c index 9d9d4af..c0eff89 100644 --- a/libgfortran/generated/iany_i4.c +++ b/libgfortran/generated/iany_i4.c @@ -220,6 +220,16 @@ miany_i4 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + iany_i4 (retarray, array, pdim, back); +#else + iany_i4 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ siany_i4 (gfc_array_i4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG iany_i4 (retarray, array, pdim, back); diff --git a/libgfortran/generated/iany_i8.c b/libgfortran/generated/iany_i8.c index e3f3081..6b8956d 100644 --- a/libgfortran/generated/iany_i8.c +++ b/libgfortran/generated/iany_i8.c @@ -220,6 +220,16 @@ miany_i8 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + iany_i8 (retarray, array, pdim, back); +#else + iany_i8 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ siany_i8 (gfc_array_i8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG iany_i8 (retarray, array, pdim, back); diff --git a/libgfortran/generated/iparity_i1.c b/libgfortran/generated/iparity_i1.c index cdcae29..75db3e6 100644 --- a/libgfortran/generated/iparity_i1.c +++ b/libgfortran/generated/iparity_i1.c @@ -220,6 +220,16 @@ miparity_i1 (gfc_array_i1 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + iparity_i1 (retarray, array, pdim, back); +#else + iparity_i1 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ siparity_i1 (gfc_array_i1 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG iparity_i1 (retarray, array, pdim, back); diff --git a/libgfortran/generated/iparity_i16.c b/libgfortran/generated/iparity_i16.c index 7705648..70593f6 100644 --- a/libgfortran/generated/iparity_i16.c +++ b/libgfortran/generated/iparity_i16.c @@ -220,6 +220,16 @@ miparity_i16 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + iparity_i16 (retarray, array, pdim, back); +#else + iparity_i16 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ siparity_i16 (gfc_array_i16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG iparity_i16 (retarray, array, pdim, back); diff --git a/libgfortran/generated/iparity_i2.c b/libgfortran/generated/iparity_i2.c index 87422a7..3fd0884 100644 --- a/libgfortran/generated/iparity_i2.c +++ b/libgfortran/generated/iparity_i2.c @@ -220,6 +220,16 @@ miparity_i2 (gfc_array_i2 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + iparity_i2 (retarray, array, pdim, back); +#else + iparity_i2 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ siparity_i2 (gfc_array_i2 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG iparity_i2 (retarray, array, pdim, back); diff --git a/libgfortran/generated/iparity_i4.c b/libgfortran/generated/iparity_i4.c index a4384e1..0ce622b 100644 --- a/libgfortran/generated/iparity_i4.c +++ b/libgfortran/generated/iparity_i4.c @@ -220,6 +220,16 @@ miparity_i4 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + iparity_i4 (retarray, array, pdim, back); +#else + iparity_i4 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ siparity_i4 (gfc_array_i4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG iparity_i4 (retarray, array, pdim, back); diff --git a/libgfortran/generated/iparity_i8.c b/libgfortran/generated/iparity_i8.c index 2321bc3..7511fa3 100644 --- a/libgfortran/generated/iparity_i8.c +++ b/libgfortran/generated/iparity_i8.c @@ -220,6 +220,16 @@ miparity_i8 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + iparity_i8 (retarray, array, pdim, back); +#else + iparity_i8 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ siparity_i8 (gfc_array_i8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG iparity_i8 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxloc0_16_i1.c b/libgfortran/generated/maxloc0_16_i1.c index ac09f14..f67c478 100644 --- a/libgfortran/generated/maxloc0_16_i1.c +++ b/libgfortran/generated/maxloc0_16_i1.c @@ -198,6 +198,13 @@ mmaxloc0_16_i1 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + maxloc0_16_i1 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -369,7 +376,7 @@ smaxloc0_16_i1 (gfc_array_i16 * const restrict retarray, index_type n; GFC_INTEGER_16 *dest; - if (*mask) + if (mask == NULL || *mask) { maxloc0_16_i1 (retarray, array, back); return; diff --git a/libgfortran/generated/maxloc0_16_i16.c b/libgfortran/generated/maxloc0_16_i16.c index f3cfd9d..8de56ac 100644 --- a/libgfortran/generated/maxloc0_16_i16.c +++ b/libgfortran/generated/maxloc0_16_i16.c @@ -198,6 +198,13 @@ mmaxloc0_16_i16 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + maxloc0_16_i16 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -369,7 +376,7 @@ smaxloc0_16_i16 (gfc_array_i16 * const restrict retarray, index_type n; GFC_INTEGER_16 *dest; - if (*mask) + if (mask == NULL || *mask) { maxloc0_16_i16 (retarray, array, back); return; diff --git a/libgfortran/generated/maxloc0_16_i2.c b/libgfortran/generated/maxloc0_16_i2.c index f90744a..a084a8d 100644 --- a/libgfortran/generated/maxloc0_16_i2.c +++ b/libgfortran/generated/maxloc0_16_i2.c @@ -198,6 +198,13 @@ mmaxloc0_16_i2 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + maxloc0_16_i2 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -369,7 +376,7 @@ smaxloc0_16_i2 (gfc_array_i16 * const restrict retarray, index_type n; GFC_INTEGER_16 *dest; - if (*mask) + if (mask == NULL || *mask) { maxloc0_16_i2 (retarray, array, back); return; diff --git a/libgfortran/generated/maxloc0_16_i4.c b/libgfortran/generated/maxloc0_16_i4.c index 3949103..730dc7b 100644 --- a/libgfortran/generated/maxloc0_16_i4.c +++ b/libgfortran/generated/maxloc0_16_i4.c @@ -198,6 +198,13 @@ mmaxloc0_16_i4 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + maxloc0_16_i4 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -369,7 +376,7 @@ smaxloc0_16_i4 (gfc_array_i16 * const restrict retarray, index_type n; GFC_INTEGER_16 *dest; - if (*mask) + if (mask == NULL || *mask) { maxloc0_16_i4 (retarray, array, back); return; diff --git a/libgfortran/generated/maxloc0_16_i8.c b/libgfortran/generated/maxloc0_16_i8.c index 5a569e8..5cdeae5 100644 --- a/libgfortran/generated/maxloc0_16_i8.c +++ b/libgfortran/generated/maxloc0_16_i8.c @@ -198,6 +198,13 @@ mmaxloc0_16_i8 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + maxloc0_16_i8 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -369,7 +376,7 @@ smaxloc0_16_i8 (gfc_array_i16 * const restrict retarray, index_type n; GFC_INTEGER_16 *dest; - if (*mask) + if (mask == NULL || *mask) { maxloc0_16_i8 (retarray, array, back); return; diff --git a/libgfortran/generated/maxloc0_16_r10.c b/libgfortran/generated/maxloc0_16_r10.c index f8dc737..4804599 100644 --- a/libgfortran/generated/maxloc0_16_r10.c +++ b/libgfortran/generated/maxloc0_16_r10.c @@ -198,6 +198,13 @@ mmaxloc0_16_r10 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + maxloc0_16_r10 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -369,7 +376,7 @@ smaxloc0_16_r10 (gfc_array_i16 * const restrict retarray, index_type n; GFC_INTEGER_16 *dest; - if (*mask) + if (mask == NULL || *mask) { maxloc0_16_r10 (retarray, array, back); return; diff --git a/libgfortran/generated/maxloc0_16_r16.c b/libgfortran/generated/maxloc0_16_r16.c index 8c78a6d..2e94aca 100644 --- a/libgfortran/generated/maxloc0_16_r16.c +++ b/libgfortran/generated/maxloc0_16_r16.c @@ -198,6 +198,13 @@ mmaxloc0_16_r16 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + maxloc0_16_r16 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -369,7 +376,7 @@ smaxloc0_16_r16 (gfc_array_i16 * const restrict retarray, index_type n; GFC_INTEGER_16 *dest; - if (*mask) + if (mask == NULL || *mask) { maxloc0_16_r16 (retarray, array, back); return; diff --git a/libgfortran/generated/maxloc0_16_r4.c b/libgfortran/generated/maxloc0_16_r4.c index 961f39c..e4ecabb 100644 --- a/libgfortran/generated/maxloc0_16_r4.c +++ b/libgfortran/generated/maxloc0_16_r4.c @@ -198,6 +198,13 @@ mmaxloc0_16_r4 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + maxloc0_16_r4 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -369,7 +376,7 @@ smaxloc0_16_r4 (gfc_array_i16 * const restrict retarray, index_type n; GFC_INTEGER_16 *dest; - if (*mask) + if (mask == NULL || *mask) { maxloc0_16_r4 (retarray, array, back); return; diff --git a/libgfortran/generated/maxloc0_16_r8.c b/libgfortran/generated/maxloc0_16_r8.c index c5414b4..1faa4bb 100644 --- a/libgfortran/generated/maxloc0_16_r8.c +++ b/libgfortran/generated/maxloc0_16_r8.c @@ -198,6 +198,13 @@ mmaxloc0_16_r8 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + maxloc0_16_r8 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -369,7 +376,7 @@ smaxloc0_16_r8 (gfc_array_i16 * const restrict retarray, index_type n; GFC_INTEGER_16 *dest; - if (*mask) + if (mask == NULL || *mask) { maxloc0_16_r8 (retarray, array, back); return; diff --git a/libgfortran/generated/maxloc0_16_s1.c b/libgfortran/generated/maxloc0_16_s1.c index cfe3568..ee2a8b7 100644 --- a/libgfortran/generated/maxloc0_16_s1.c +++ b/libgfortran/generated/maxloc0_16_s1.c @@ -174,6 +174,16 @@ mmaxloc0_16_s1 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc0_16_s1 (retarray, array, back, len); +#else + maxloc0_16_s1 (retarray, array, len); +#endif + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -304,7 +314,7 @@ smaxloc0_16_s1 (gfc_array_i16 * const restrict retarray, index_type n; GFC_INTEGER_16 *dest; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc0_16_s1 (retarray, array, back, len); diff --git a/libgfortran/generated/maxloc0_16_s4.c b/libgfortran/generated/maxloc0_16_s4.c index dc16503..b26fb68 100644 --- a/libgfortran/generated/maxloc0_16_s4.c +++ b/libgfortran/generated/maxloc0_16_s4.c @@ -174,6 +174,16 @@ mmaxloc0_16_s4 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc0_16_s4 (retarray, array, back, len); +#else + maxloc0_16_s4 (retarray, array, len); +#endif + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -304,7 +314,7 @@ smaxloc0_16_s4 (gfc_array_i16 * const restrict retarray, index_type n; GFC_INTEGER_16 *dest; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc0_16_s4 (retarray, array, back, len); diff --git a/libgfortran/generated/maxloc0_4_i1.c b/libgfortran/generated/maxloc0_4_i1.c index 014bcb1..2976ee8 100644 --- a/libgfortran/generated/maxloc0_4_i1.c +++ b/libgfortran/generated/maxloc0_4_i1.c @@ -198,6 +198,13 @@ mmaxloc0_4_i1 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + maxloc0_4_i1 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -369,7 +376,7 @@ smaxloc0_4_i1 (gfc_array_i4 * const restrict retarray, index_type n; GFC_INTEGER_4 *dest; - if (*mask) + if (mask == NULL || *mask) { maxloc0_4_i1 (retarray, array, back); return; diff --git a/libgfortran/generated/maxloc0_4_i16.c b/libgfortran/generated/maxloc0_4_i16.c index 42262d2..00e6bed 100644 --- a/libgfortran/generated/maxloc0_4_i16.c +++ b/libgfortran/generated/maxloc0_4_i16.c @@ -198,6 +198,13 @@ mmaxloc0_4_i16 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + maxloc0_4_i16 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -369,7 +376,7 @@ smaxloc0_4_i16 (gfc_array_i4 * const restrict retarray, index_type n; GFC_INTEGER_4 *dest; - if (*mask) + if (mask == NULL || *mask) { maxloc0_4_i16 (retarray, array, back); return; diff --git a/libgfortran/generated/maxloc0_4_i2.c b/libgfortran/generated/maxloc0_4_i2.c index dd9e678..1c973a0 100644 --- a/libgfortran/generated/maxloc0_4_i2.c +++ b/libgfortran/generated/maxloc0_4_i2.c @@ -198,6 +198,13 @@ mmaxloc0_4_i2 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + maxloc0_4_i2 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -369,7 +376,7 @@ smaxloc0_4_i2 (gfc_array_i4 * const restrict retarray, index_type n; GFC_INTEGER_4 *dest; - if (*mask) + if (mask == NULL || *mask) { maxloc0_4_i2 (retarray, array, back); return; diff --git a/libgfortran/generated/maxloc0_4_i4.c b/libgfortran/generated/maxloc0_4_i4.c index ca389b8..3c704da 100644 --- a/libgfortran/generated/maxloc0_4_i4.c +++ b/libgfortran/generated/maxloc0_4_i4.c @@ -198,6 +198,13 @@ mmaxloc0_4_i4 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + maxloc0_4_i4 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -369,7 +376,7 @@ smaxloc0_4_i4 (gfc_array_i4 * const restrict retarray, index_type n; GFC_INTEGER_4 *dest; - if (*mask) + if (mask == NULL || *mask) { maxloc0_4_i4 (retarray, array, back); return; diff --git a/libgfortran/generated/maxloc0_4_i8.c b/libgfortran/generated/maxloc0_4_i8.c index 1d24756..a755d7a 100644 --- a/libgfortran/generated/maxloc0_4_i8.c +++ b/libgfortran/generated/maxloc0_4_i8.c @@ -198,6 +198,13 @@ mmaxloc0_4_i8 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + maxloc0_4_i8 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -369,7 +376,7 @@ smaxloc0_4_i8 (gfc_array_i4 * const restrict retarray, index_type n; GFC_INTEGER_4 *dest; - if (*mask) + if (mask == NULL || *mask) { maxloc0_4_i8 (retarray, array, back); return; diff --git a/libgfortran/generated/maxloc0_4_r10.c b/libgfortran/generated/maxloc0_4_r10.c index 1008bdf..c50d0f6 100644 --- a/libgfortran/generated/maxloc0_4_r10.c +++ b/libgfortran/generated/maxloc0_4_r10.c @@ -198,6 +198,13 @@ mmaxloc0_4_r10 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + maxloc0_4_r10 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -369,7 +376,7 @@ smaxloc0_4_r10 (gfc_array_i4 * const restrict retarray, index_type n; GFC_INTEGER_4 *dest; - if (*mask) + if (mask == NULL || *mask) { maxloc0_4_r10 (retarray, array, back); return; diff --git a/libgfortran/generated/maxloc0_4_r16.c b/libgfortran/generated/maxloc0_4_r16.c index 781bf84..d990e77 100644 --- a/libgfortran/generated/maxloc0_4_r16.c +++ b/libgfortran/generated/maxloc0_4_r16.c @@ -198,6 +198,13 @@ mmaxloc0_4_r16 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + maxloc0_4_r16 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -369,7 +376,7 @@ smaxloc0_4_r16 (gfc_array_i4 * const restrict retarray, index_type n; GFC_INTEGER_4 *dest; - if (*mask) + if (mask == NULL || *mask) { maxloc0_4_r16 (retarray, array, back); return; diff --git a/libgfortran/generated/maxloc0_4_r4.c b/libgfortran/generated/maxloc0_4_r4.c index c2796c6..cfc3a87 100644 --- a/libgfortran/generated/maxloc0_4_r4.c +++ b/libgfortran/generated/maxloc0_4_r4.c @@ -198,6 +198,13 @@ mmaxloc0_4_r4 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + maxloc0_4_r4 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -369,7 +376,7 @@ smaxloc0_4_r4 (gfc_array_i4 * const restrict retarray, index_type n; GFC_INTEGER_4 *dest; - if (*mask) + if (mask == NULL || *mask) { maxloc0_4_r4 (retarray, array, back); return; diff --git a/libgfortran/generated/maxloc0_4_r8.c b/libgfortran/generated/maxloc0_4_r8.c index 38f3f6ff..6d6fe5a 100644 --- a/libgfortran/generated/maxloc0_4_r8.c +++ b/libgfortran/generated/maxloc0_4_r8.c @@ -198,6 +198,13 @@ mmaxloc0_4_r8 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + maxloc0_4_r8 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -369,7 +376,7 @@ smaxloc0_4_r8 (gfc_array_i4 * const restrict retarray, index_type n; GFC_INTEGER_4 *dest; - if (*mask) + if (mask == NULL || *mask) { maxloc0_4_r8 (retarray, array, back); return; diff --git a/libgfortran/generated/maxloc0_4_s1.c b/libgfortran/generated/maxloc0_4_s1.c index 094a5b4..8533614 100644 --- a/libgfortran/generated/maxloc0_4_s1.c +++ b/libgfortran/generated/maxloc0_4_s1.c @@ -174,6 +174,16 @@ mmaxloc0_4_s1 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc0_4_s1 (retarray, array, back, len); +#else + maxloc0_4_s1 (retarray, array, len); +#endif + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -304,7 +314,7 @@ smaxloc0_4_s1 (gfc_array_i4 * const restrict retarray, index_type n; GFC_INTEGER_4 *dest; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc0_4_s1 (retarray, array, back, len); diff --git a/libgfortran/generated/maxloc0_4_s4.c b/libgfortran/generated/maxloc0_4_s4.c index b751faa..22d58ff 100644 --- a/libgfortran/generated/maxloc0_4_s4.c +++ b/libgfortran/generated/maxloc0_4_s4.c @@ -174,6 +174,16 @@ mmaxloc0_4_s4 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc0_4_s4 (retarray, array, back, len); +#else + maxloc0_4_s4 (retarray, array, len); +#endif + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -304,7 +314,7 @@ smaxloc0_4_s4 (gfc_array_i4 * const restrict retarray, index_type n; GFC_INTEGER_4 *dest; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc0_4_s4 (retarray, array, back, len); diff --git a/libgfortran/generated/maxloc0_8_i1.c b/libgfortran/generated/maxloc0_8_i1.c index a2ec27f..509b7f8 100644 --- a/libgfortran/generated/maxloc0_8_i1.c +++ b/libgfortran/generated/maxloc0_8_i1.c @@ -198,6 +198,13 @@ mmaxloc0_8_i1 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + maxloc0_8_i1 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -369,7 +376,7 @@ smaxloc0_8_i1 (gfc_array_i8 * const restrict retarray, index_type n; GFC_INTEGER_8 *dest; - if (*mask) + if (mask == NULL || *mask) { maxloc0_8_i1 (retarray, array, back); return; diff --git a/libgfortran/generated/maxloc0_8_i16.c b/libgfortran/generated/maxloc0_8_i16.c index 30a12d1..c23d40c 100644 --- a/libgfortran/generated/maxloc0_8_i16.c +++ b/libgfortran/generated/maxloc0_8_i16.c @@ -198,6 +198,13 @@ mmaxloc0_8_i16 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + maxloc0_8_i16 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -369,7 +376,7 @@ smaxloc0_8_i16 (gfc_array_i8 * const restrict retarray, index_type n; GFC_INTEGER_8 *dest; - if (*mask) + if (mask == NULL || *mask) { maxloc0_8_i16 (retarray, array, back); return; diff --git a/libgfortran/generated/maxloc0_8_i2.c b/libgfortran/generated/maxloc0_8_i2.c index 6592aec..3335c15 100644 --- a/libgfortran/generated/maxloc0_8_i2.c +++ b/libgfortran/generated/maxloc0_8_i2.c @@ -198,6 +198,13 @@ mmaxloc0_8_i2 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + maxloc0_8_i2 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -369,7 +376,7 @@ smaxloc0_8_i2 (gfc_array_i8 * const restrict retarray, index_type n; GFC_INTEGER_8 *dest; - if (*mask) + if (mask == NULL || *mask) { maxloc0_8_i2 (retarray, array, back); return; diff --git a/libgfortran/generated/maxloc0_8_i4.c b/libgfortran/generated/maxloc0_8_i4.c index a32f537..eb61197 100644 --- a/libgfortran/generated/maxloc0_8_i4.c +++ b/libgfortran/generated/maxloc0_8_i4.c @@ -198,6 +198,13 @@ mmaxloc0_8_i4 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + maxloc0_8_i4 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -369,7 +376,7 @@ smaxloc0_8_i4 (gfc_array_i8 * const restrict retarray, index_type n; GFC_INTEGER_8 *dest; - if (*mask) + if (mask == NULL || *mask) { maxloc0_8_i4 (retarray, array, back); return; diff --git a/libgfortran/generated/maxloc0_8_i8.c b/libgfortran/generated/maxloc0_8_i8.c index ff9de7f..9e1abfb 100644 --- a/libgfortran/generated/maxloc0_8_i8.c +++ b/libgfortran/generated/maxloc0_8_i8.c @@ -198,6 +198,13 @@ mmaxloc0_8_i8 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + maxloc0_8_i8 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -369,7 +376,7 @@ smaxloc0_8_i8 (gfc_array_i8 * const restrict retarray, index_type n; GFC_INTEGER_8 *dest; - if (*mask) + if (mask == NULL || *mask) { maxloc0_8_i8 (retarray, array, back); return; diff --git a/libgfortran/generated/maxloc0_8_r10.c b/libgfortran/generated/maxloc0_8_r10.c index 2aacaf9..1073c8b 100644 --- a/libgfortran/generated/maxloc0_8_r10.c +++ b/libgfortran/generated/maxloc0_8_r10.c @@ -198,6 +198,13 @@ mmaxloc0_8_r10 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + maxloc0_8_r10 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -369,7 +376,7 @@ smaxloc0_8_r10 (gfc_array_i8 * const restrict retarray, index_type n; GFC_INTEGER_8 *dest; - if (*mask) + if (mask == NULL || *mask) { maxloc0_8_r10 (retarray, array, back); return; diff --git a/libgfortran/generated/maxloc0_8_r16.c b/libgfortran/generated/maxloc0_8_r16.c index 9ffde92..c862578 100644 --- a/libgfortran/generated/maxloc0_8_r16.c +++ b/libgfortran/generated/maxloc0_8_r16.c @@ -198,6 +198,13 @@ mmaxloc0_8_r16 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + maxloc0_8_r16 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -369,7 +376,7 @@ smaxloc0_8_r16 (gfc_array_i8 * const restrict retarray, index_type n; GFC_INTEGER_8 *dest; - if (*mask) + if (mask == NULL || *mask) { maxloc0_8_r16 (retarray, array, back); return; diff --git a/libgfortran/generated/maxloc0_8_r4.c b/libgfortran/generated/maxloc0_8_r4.c index 755a513..1a4671c 100644 --- a/libgfortran/generated/maxloc0_8_r4.c +++ b/libgfortran/generated/maxloc0_8_r4.c @@ -198,6 +198,13 @@ mmaxloc0_8_r4 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + maxloc0_8_r4 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -369,7 +376,7 @@ smaxloc0_8_r4 (gfc_array_i8 * const restrict retarray, index_type n; GFC_INTEGER_8 *dest; - if (*mask) + if (mask == NULL || *mask) { maxloc0_8_r4 (retarray, array, back); return; diff --git a/libgfortran/generated/maxloc0_8_r8.c b/libgfortran/generated/maxloc0_8_r8.c index 1bd2bf0..49480c6 100644 --- a/libgfortran/generated/maxloc0_8_r8.c +++ b/libgfortran/generated/maxloc0_8_r8.c @@ -198,6 +198,13 @@ mmaxloc0_8_r8 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + maxloc0_8_r8 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -369,7 +376,7 @@ smaxloc0_8_r8 (gfc_array_i8 * const restrict retarray, index_type n; GFC_INTEGER_8 *dest; - if (*mask) + if (mask == NULL || *mask) { maxloc0_8_r8 (retarray, array, back); return; diff --git a/libgfortran/generated/maxloc0_8_s1.c b/libgfortran/generated/maxloc0_8_s1.c index 173aa13..a36e1df 100644 --- a/libgfortran/generated/maxloc0_8_s1.c +++ b/libgfortran/generated/maxloc0_8_s1.c @@ -174,6 +174,16 @@ mmaxloc0_8_s1 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc0_8_s1 (retarray, array, back, len); +#else + maxloc0_8_s1 (retarray, array, len); +#endif + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -304,7 +314,7 @@ smaxloc0_8_s1 (gfc_array_i8 * const restrict retarray, index_type n; GFC_INTEGER_8 *dest; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc0_8_s1 (retarray, array, back, len); diff --git a/libgfortran/generated/maxloc0_8_s4.c b/libgfortran/generated/maxloc0_8_s4.c index 60176b4..fc28686 100644 --- a/libgfortran/generated/maxloc0_8_s4.c +++ b/libgfortran/generated/maxloc0_8_s4.c @@ -174,6 +174,16 @@ mmaxloc0_8_s4 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc0_8_s4 (retarray, array, back, len); +#else + maxloc0_8_s4 (retarray, array, len); +#endif + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -304,7 +314,7 @@ smaxloc0_8_s4 (gfc_array_i8 * const restrict retarray, index_type n; GFC_INTEGER_8 *dest; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc0_8_s4 (retarray, array, back, len); diff --git a/libgfortran/generated/maxloc1_16_i1.c b/libgfortran/generated/maxloc1_16_i1.c index 70b0ba5..bea0f3a 100644 --- a/libgfortran/generated/maxloc1_16_i1.c +++ b/libgfortran/generated/maxloc1_16_i1.c @@ -248,6 +248,16 @@ mmaxloc1_16_i1 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_16_i1 (retarray, array, pdim, back); +#else + maxloc1_16_i1 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -470,7 +480,7 @@ smaxloc1_16_i1 (gfc_array_i16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_16_i1 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxloc1_16_i16.c b/libgfortran/generated/maxloc1_16_i16.c index 99310e1..a51d7e2 100644 --- a/libgfortran/generated/maxloc1_16_i16.c +++ b/libgfortran/generated/maxloc1_16_i16.c @@ -248,6 +248,16 @@ mmaxloc1_16_i16 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_16_i16 (retarray, array, pdim, back); +#else + maxloc1_16_i16 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -470,7 +480,7 @@ smaxloc1_16_i16 (gfc_array_i16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_16_i16 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxloc1_16_i2.c b/libgfortran/generated/maxloc1_16_i2.c index ac8b391..ccbc7c9 100644 --- a/libgfortran/generated/maxloc1_16_i2.c +++ b/libgfortran/generated/maxloc1_16_i2.c @@ -248,6 +248,16 @@ mmaxloc1_16_i2 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_16_i2 (retarray, array, pdim, back); +#else + maxloc1_16_i2 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -470,7 +480,7 @@ smaxloc1_16_i2 (gfc_array_i16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_16_i2 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxloc1_16_i4.c b/libgfortran/generated/maxloc1_16_i4.c index 12f2c87..f92d61f 100644 --- a/libgfortran/generated/maxloc1_16_i4.c +++ b/libgfortran/generated/maxloc1_16_i4.c @@ -248,6 +248,16 @@ mmaxloc1_16_i4 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_16_i4 (retarray, array, pdim, back); +#else + maxloc1_16_i4 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -470,7 +480,7 @@ smaxloc1_16_i4 (gfc_array_i16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_16_i4 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxloc1_16_i8.c b/libgfortran/generated/maxloc1_16_i8.c index e8fb57b..7552564 100644 --- a/libgfortran/generated/maxloc1_16_i8.c +++ b/libgfortran/generated/maxloc1_16_i8.c @@ -248,6 +248,16 @@ mmaxloc1_16_i8 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_16_i8 (retarray, array, pdim, back); +#else + maxloc1_16_i8 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -470,7 +480,7 @@ smaxloc1_16_i8 (gfc_array_i16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_16_i8 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxloc1_16_r10.c b/libgfortran/generated/maxloc1_16_r10.c index b610133..dc5e27c 100644 --- a/libgfortran/generated/maxloc1_16_r10.c +++ b/libgfortran/generated/maxloc1_16_r10.c @@ -248,6 +248,16 @@ mmaxloc1_16_r10 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_16_r10 (retarray, array, pdim, back); +#else + maxloc1_16_r10 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -470,7 +480,7 @@ smaxloc1_16_r10 (gfc_array_i16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_16_r10 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxloc1_16_r16.c b/libgfortran/generated/maxloc1_16_r16.c index 44aaf0f..c562d18 100644 --- a/libgfortran/generated/maxloc1_16_r16.c +++ b/libgfortran/generated/maxloc1_16_r16.c @@ -248,6 +248,16 @@ mmaxloc1_16_r16 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_16_r16 (retarray, array, pdim, back); +#else + maxloc1_16_r16 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -470,7 +480,7 @@ smaxloc1_16_r16 (gfc_array_i16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_16_r16 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxloc1_16_r4.c b/libgfortran/generated/maxloc1_16_r4.c index aefba16..4a48f72 100644 --- a/libgfortran/generated/maxloc1_16_r4.c +++ b/libgfortran/generated/maxloc1_16_r4.c @@ -248,6 +248,16 @@ mmaxloc1_16_r4 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_16_r4 (retarray, array, pdim, back); +#else + maxloc1_16_r4 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -470,7 +480,7 @@ smaxloc1_16_r4 (gfc_array_i16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_16_r4 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxloc1_16_r8.c b/libgfortran/generated/maxloc1_16_r8.c index 9c8b193..aca6cc6 100644 --- a/libgfortran/generated/maxloc1_16_r8.c +++ b/libgfortran/generated/maxloc1_16_r8.c @@ -248,6 +248,16 @@ mmaxloc1_16_r8 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_16_r8 (retarray, array, pdim, back); +#else + maxloc1_16_r8 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -470,7 +480,7 @@ smaxloc1_16_r8 (gfc_array_i16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_16_r8 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxloc1_16_s1.c b/libgfortran/generated/maxloc1_16_s1.c index 538d44c..edc1975 100644 --- a/libgfortran/generated/maxloc1_16_s1.c +++ b/libgfortran/generated/maxloc1_16_s1.c @@ -241,6 +241,16 @@ mmaxloc1_16_s1 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_16_s1 (retarray, array, pdim, back, string_len); +#else + maxloc1_16_s1 (retarray, array, pdim, string_len); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -436,7 +446,7 @@ smaxloc1_16_s1 (gfc_array_i16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_16_s1 (retarray, array, pdim, back, string_len); diff --git a/libgfortran/generated/maxloc1_16_s4.c b/libgfortran/generated/maxloc1_16_s4.c index dce5c89..0f94b7b 100644 --- a/libgfortran/generated/maxloc1_16_s4.c +++ b/libgfortran/generated/maxloc1_16_s4.c @@ -241,6 +241,16 @@ mmaxloc1_16_s4 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_16_s4 (retarray, array, pdim, back, string_len); +#else + maxloc1_16_s4 (retarray, array, pdim, string_len); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -436,7 +446,7 @@ smaxloc1_16_s4 (gfc_array_i16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_16_s4 (retarray, array, pdim, back, string_len); diff --git a/libgfortran/generated/maxloc1_4_i1.c b/libgfortran/generated/maxloc1_4_i1.c index 7bcb5bb..ad953ac 100644 --- a/libgfortran/generated/maxloc1_4_i1.c +++ b/libgfortran/generated/maxloc1_4_i1.c @@ -248,6 +248,16 @@ mmaxloc1_4_i1 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_4_i1 (retarray, array, pdim, back); +#else + maxloc1_4_i1 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -470,7 +480,7 @@ smaxloc1_4_i1 (gfc_array_i4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_4_i1 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxloc1_4_i16.c b/libgfortran/generated/maxloc1_4_i16.c index 8e1ba58..6cbebeb 100644 --- a/libgfortran/generated/maxloc1_4_i16.c +++ b/libgfortran/generated/maxloc1_4_i16.c @@ -248,6 +248,16 @@ mmaxloc1_4_i16 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_4_i16 (retarray, array, pdim, back); +#else + maxloc1_4_i16 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -470,7 +480,7 @@ smaxloc1_4_i16 (gfc_array_i4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_4_i16 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxloc1_4_i2.c b/libgfortran/generated/maxloc1_4_i2.c index 62175d2..70dedf7 100644 --- a/libgfortran/generated/maxloc1_4_i2.c +++ b/libgfortran/generated/maxloc1_4_i2.c @@ -248,6 +248,16 @@ mmaxloc1_4_i2 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_4_i2 (retarray, array, pdim, back); +#else + maxloc1_4_i2 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -470,7 +480,7 @@ smaxloc1_4_i2 (gfc_array_i4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_4_i2 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxloc1_4_i4.c b/libgfortran/generated/maxloc1_4_i4.c index b507ab3..775ada9 100644 --- a/libgfortran/generated/maxloc1_4_i4.c +++ b/libgfortran/generated/maxloc1_4_i4.c @@ -248,6 +248,16 @@ mmaxloc1_4_i4 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_4_i4 (retarray, array, pdim, back); +#else + maxloc1_4_i4 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -470,7 +480,7 @@ smaxloc1_4_i4 (gfc_array_i4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_4_i4 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxloc1_4_i8.c b/libgfortran/generated/maxloc1_4_i8.c index 752b231..e9361fe 100644 --- a/libgfortran/generated/maxloc1_4_i8.c +++ b/libgfortran/generated/maxloc1_4_i8.c @@ -248,6 +248,16 @@ mmaxloc1_4_i8 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_4_i8 (retarray, array, pdim, back); +#else + maxloc1_4_i8 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -470,7 +480,7 @@ smaxloc1_4_i8 (gfc_array_i4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_4_i8 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxloc1_4_r10.c b/libgfortran/generated/maxloc1_4_r10.c index 851fd71..0ce1684 100644 --- a/libgfortran/generated/maxloc1_4_r10.c +++ b/libgfortran/generated/maxloc1_4_r10.c @@ -248,6 +248,16 @@ mmaxloc1_4_r10 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_4_r10 (retarray, array, pdim, back); +#else + maxloc1_4_r10 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -470,7 +480,7 @@ smaxloc1_4_r10 (gfc_array_i4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_4_r10 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxloc1_4_r16.c b/libgfortran/generated/maxloc1_4_r16.c index b23f7a5..b96a7f6 100644 --- a/libgfortran/generated/maxloc1_4_r16.c +++ b/libgfortran/generated/maxloc1_4_r16.c @@ -248,6 +248,16 @@ mmaxloc1_4_r16 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_4_r16 (retarray, array, pdim, back); +#else + maxloc1_4_r16 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -470,7 +480,7 @@ smaxloc1_4_r16 (gfc_array_i4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_4_r16 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxloc1_4_r4.c b/libgfortran/generated/maxloc1_4_r4.c index 9cf1375..ff2e105 100644 --- a/libgfortran/generated/maxloc1_4_r4.c +++ b/libgfortran/generated/maxloc1_4_r4.c @@ -248,6 +248,16 @@ mmaxloc1_4_r4 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_4_r4 (retarray, array, pdim, back); +#else + maxloc1_4_r4 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -470,7 +480,7 @@ smaxloc1_4_r4 (gfc_array_i4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_4_r4 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxloc1_4_r8.c b/libgfortran/generated/maxloc1_4_r8.c index e6884f2..d6bbc47 100644 --- a/libgfortran/generated/maxloc1_4_r8.c +++ b/libgfortran/generated/maxloc1_4_r8.c @@ -248,6 +248,16 @@ mmaxloc1_4_r8 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_4_r8 (retarray, array, pdim, back); +#else + maxloc1_4_r8 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -470,7 +480,7 @@ smaxloc1_4_r8 (gfc_array_i4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_4_r8 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxloc1_4_s1.c b/libgfortran/generated/maxloc1_4_s1.c index d194d70..944d711 100644 --- a/libgfortran/generated/maxloc1_4_s1.c +++ b/libgfortran/generated/maxloc1_4_s1.c @@ -241,6 +241,16 @@ mmaxloc1_4_s1 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_4_s1 (retarray, array, pdim, back, string_len); +#else + maxloc1_4_s1 (retarray, array, pdim, string_len); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -436,7 +446,7 @@ smaxloc1_4_s1 (gfc_array_i4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_4_s1 (retarray, array, pdim, back, string_len); diff --git a/libgfortran/generated/maxloc1_4_s4.c b/libgfortran/generated/maxloc1_4_s4.c index b3e68b5..8afa10c 100644 --- a/libgfortran/generated/maxloc1_4_s4.c +++ b/libgfortran/generated/maxloc1_4_s4.c @@ -241,6 +241,16 @@ mmaxloc1_4_s4 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_4_s4 (retarray, array, pdim, back, string_len); +#else + maxloc1_4_s4 (retarray, array, pdim, string_len); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -436,7 +446,7 @@ smaxloc1_4_s4 (gfc_array_i4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_4_s4 (retarray, array, pdim, back, string_len); diff --git a/libgfortran/generated/maxloc1_8_i1.c b/libgfortran/generated/maxloc1_8_i1.c index cd9bb65..bb6e101 100644 --- a/libgfortran/generated/maxloc1_8_i1.c +++ b/libgfortran/generated/maxloc1_8_i1.c @@ -248,6 +248,16 @@ mmaxloc1_8_i1 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_8_i1 (retarray, array, pdim, back); +#else + maxloc1_8_i1 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -470,7 +480,7 @@ smaxloc1_8_i1 (gfc_array_i8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_8_i1 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxloc1_8_i16.c b/libgfortran/generated/maxloc1_8_i16.c index 0c78ec8..a15ded8 100644 --- a/libgfortran/generated/maxloc1_8_i16.c +++ b/libgfortran/generated/maxloc1_8_i16.c @@ -248,6 +248,16 @@ mmaxloc1_8_i16 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_8_i16 (retarray, array, pdim, back); +#else + maxloc1_8_i16 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -470,7 +480,7 @@ smaxloc1_8_i16 (gfc_array_i8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_8_i16 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxloc1_8_i2.c b/libgfortran/generated/maxloc1_8_i2.c index 41cf3b1..7435c5e 100644 --- a/libgfortran/generated/maxloc1_8_i2.c +++ b/libgfortran/generated/maxloc1_8_i2.c @@ -248,6 +248,16 @@ mmaxloc1_8_i2 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_8_i2 (retarray, array, pdim, back); +#else + maxloc1_8_i2 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -470,7 +480,7 @@ smaxloc1_8_i2 (gfc_array_i8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_8_i2 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxloc1_8_i4.c b/libgfortran/generated/maxloc1_8_i4.c index 46ff5bb..b921916 100644 --- a/libgfortran/generated/maxloc1_8_i4.c +++ b/libgfortran/generated/maxloc1_8_i4.c @@ -248,6 +248,16 @@ mmaxloc1_8_i4 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_8_i4 (retarray, array, pdim, back); +#else + maxloc1_8_i4 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -470,7 +480,7 @@ smaxloc1_8_i4 (gfc_array_i8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_8_i4 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxloc1_8_i8.c b/libgfortran/generated/maxloc1_8_i8.c index 3124675..9cc0a8e 100644 --- a/libgfortran/generated/maxloc1_8_i8.c +++ b/libgfortran/generated/maxloc1_8_i8.c @@ -248,6 +248,16 @@ mmaxloc1_8_i8 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_8_i8 (retarray, array, pdim, back); +#else + maxloc1_8_i8 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -470,7 +480,7 @@ smaxloc1_8_i8 (gfc_array_i8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_8_i8 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxloc1_8_r10.c b/libgfortran/generated/maxloc1_8_r10.c index c8d025f..e0d44ab 100644 --- a/libgfortran/generated/maxloc1_8_r10.c +++ b/libgfortran/generated/maxloc1_8_r10.c @@ -248,6 +248,16 @@ mmaxloc1_8_r10 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_8_r10 (retarray, array, pdim, back); +#else + maxloc1_8_r10 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -470,7 +480,7 @@ smaxloc1_8_r10 (gfc_array_i8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_8_r10 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxloc1_8_r16.c b/libgfortran/generated/maxloc1_8_r16.c index b1ef57c..de3ed8f 100644 --- a/libgfortran/generated/maxloc1_8_r16.c +++ b/libgfortran/generated/maxloc1_8_r16.c @@ -248,6 +248,16 @@ mmaxloc1_8_r16 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_8_r16 (retarray, array, pdim, back); +#else + maxloc1_8_r16 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -470,7 +480,7 @@ smaxloc1_8_r16 (gfc_array_i8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_8_r16 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxloc1_8_r4.c b/libgfortran/generated/maxloc1_8_r4.c index b9b57bf..f876b25 100644 --- a/libgfortran/generated/maxloc1_8_r4.c +++ b/libgfortran/generated/maxloc1_8_r4.c @@ -248,6 +248,16 @@ mmaxloc1_8_r4 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_8_r4 (retarray, array, pdim, back); +#else + maxloc1_8_r4 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -470,7 +480,7 @@ smaxloc1_8_r4 (gfc_array_i8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_8_r4 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxloc1_8_r8.c b/libgfortran/generated/maxloc1_8_r8.c index 08fd778..6d27c2d 100644 --- a/libgfortran/generated/maxloc1_8_r8.c +++ b/libgfortran/generated/maxloc1_8_r8.c @@ -248,6 +248,16 @@ mmaxloc1_8_r8 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_8_r8 (retarray, array, pdim, back); +#else + maxloc1_8_r8 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -470,7 +480,7 @@ smaxloc1_8_r8 (gfc_array_i8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_8_r8 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxloc1_8_s1.c b/libgfortran/generated/maxloc1_8_s1.c index 0832e7b..9f69336 100644 --- a/libgfortran/generated/maxloc1_8_s1.c +++ b/libgfortran/generated/maxloc1_8_s1.c @@ -241,6 +241,16 @@ mmaxloc1_8_s1 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_8_s1 (retarray, array, pdim, back, string_len); +#else + maxloc1_8_s1 (retarray, array, pdim, string_len); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -436,7 +446,7 @@ smaxloc1_8_s1 (gfc_array_i8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_8_s1 (retarray, array, pdim, back, string_len); diff --git a/libgfortran/generated/maxloc1_8_s4.c b/libgfortran/generated/maxloc1_8_s4.c index 967f3fd..1b7bb79 100644 --- a/libgfortran/generated/maxloc1_8_s4.c +++ b/libgfortran/generated/maxloc1_8_s4.c @@ -241,6 +241,16 @@ mmaxloc1_8_s4 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxloc1_8_s4 (retarray, array, pdim, back, string_len); +#else + maxloc1_8_s4 (retarray, array, pdim, string_len); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -436,7 +446,7 @@ smaxloc1_8_s4 (gfc_array_i8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxloc1_8_s4 (retarray, array, pdim, back, string_len); diff --git a/libgfortran/generated/maxval0_s1.c b/libgfortran/generated/maxval0_s1.c index 6903918..67dcbd0 100644 --- a/libgfortran/generated/maxval0_s1.c +++ b/libgfortran/generated/maxval0_s1.c @@ -150,6 +150,12 @@ mmaxval0_s1 (GFC_UINTEGER_1 * const restrict ret, index_type n; int mask_kind; + if (mask == NULL) + { + maxval0_s1 (ret, xlen, array, len); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -247,7 +253,7 @@ smaxval0_s1 (GFC_UINTEGER_1 * restrict ret, GFC_LOGICAL_4 *mask, gfc_charlen_type len) { - if (*mask) + if (mask == NULL || *mask) { maxval0_s1 (ret, xlen, array, len); return; diff --git a/libgfortran/generated/maxval0_s4.c b/libgfortran/generated/maxval0_s4.c index 111a5de..e9d9536 100644 --- a/libgfortran/generated/maxval0_s4.c +++ b/libgfortran/generated/maxval0_s4.c @@ -150,6 +150,12 @@ mmaxval0_s4 (GFC_UINTEGER_4 * const restrict ret, index_type n; int mask_kind; + if (mask == NULL) + { + maxval0_s4 (ret, xlen, array, len); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -247,7 +253,7 @@ smaxval0_s4 (GFC_UINTEGER_4 * restrict ret, GFC_LOGICAL_4 *mask, gfc_charlen_type len) { - if (*mask) + if (mask == NULL || *mask) { maxval0_s4 (ret, xlen, array, len); return; diff --git a/libgfortran/generated/maxval1_s1.c b/libgfortran/generated/maxval1_s1.c index 1cc6483..15e6bc2 100644 --- a/libgfortran/generated/maxval1_s1.c +++ b/libgfortran/generated/maxval1_s1.c @@ -239,6 +239,12 @@ mmaxval1_s1 (gfc_array_s1 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { + maxval1_s1 (retarray, xlen, array, pdim, string_len); + return; + } + assert (xlen == string_len); dim = (*pdim) - 1; @@ -436,7 +442,7 @@ smaxval1_s1 (gfc_array_s1 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { maxval1_s1 (retarray, xlen, array, pdim, string_len); return; diff --git a/libgfortran/generated/maxval1_s4.c b/libgfortran/generated/maxval1_s4.c index 6e0e8be..6021d40 100644 --- a/libgfortran/generated/maxval1_s4.c +++ b/libgfortran/generated/maxval1_s4.c @@ -239,6 +239,12 @@ mmaxval1_s4 (gfc_array_s4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { + maxval1_s4 (retarray, xlen, array, pdim, string_len); + return; + } + assert (xlen == string_len); dim = (*pdim) - 1; @@ -436,7 +442,7 @@ smaxval1_s4 (gfc_array_s4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { maxval1_s4 (retarray, xlen, array, pdim, string_len); return; diff --git a/libgfortran/generated/maxval_i1.c b/libgfortran/generated/maxval_i1.c index defed80..9688eea 100644 --- a/libgfortran/generated/maxval_i1.c +++ b/libgfortran/generated/maxval_i1.c @@ -234,6 +234,16 @@ mmaxval_i1 (gfc_array_i1 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxval_i1 (retarray, array, pdim, back); +#else + maxval_i1 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +451,7 @@ smaxval_i1 (gfc_array_i1 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxval_i1 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxval_i16.c b/libgfortran/generated/maxval_i16.c index 03526ac..5593189 100644 --- a/libgfortran/generated/maxval_i16.c +++ b/libgfortran/generated/maxval_i16.c @@ -234,6 +234,16 @@ mmaxval_i16 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxval_i16 (retarray, array, pdim, back); +#else + maxval_i16 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +451,7 @@ smaxval_i16 (gfc_array_i16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxval_i16 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxval_i2.c b/libgfortran/generated/maxval_i2.c index 84deb7e..6f16632 100644 --- a/libgfortran/generated/maxval_i2.c +++ b/libgfortran/generated/maxval_i2.c @@ -234,6 +234,16 @@ mmaxval_i2 (gfc_array_i2 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxval_i2 (retarray, array, pdim, back); +#else + maxval_i2 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +451,7 @@ smaxval_i2 (gfc_array_i2 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxval_i2 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxval_i4.c b/libgfortran/generated/maxval_i4.c index ae36fd4..7456c2c 100644 --- a/libgfortran/generated/maxval_i4.c +++ b/libgfortran/generated/maxval_i4.c @@ -234,6 +234,16 @@ mmaxval_i4 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxval_i4 (retarray, array, pdim, back); +#else + maxval_i4 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +451,7 @@ smaxval_i4 (gfc_array_i4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxval_i4 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxval_i8.c b/libgfortran/generated/maxval_i8.c index abd8f99..afa69d1 100644 --- a/libgfortran/generated/maxval_i8.c +++ b/libgfortran/generated/maxval_i8.c @@ -234,6 +234,16 @@ mmaxval_i8 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxval_i8 (retarray, array, pdim, back); +#else + maxval_i8 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +451,7 @@ smaxval_i8 (gfc_array_i8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxval_i8 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxval_r10.c b/libgfortran/generated/maxval_r10.c index dc64059..b10ce3b 100644 --- a/libgfortran/generated/maxval_r10.c +++ b/libgfortran/generated/maxval_r10.c @@ -234,6 +234,16 @@ mmaxval_r10 (gfc_array_r10 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxval_r10 (retarray, array, pdim, back); +#else + maxval_r10 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +451,7 @@ smaxval_r10 (gfc_array_r10 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxval_r10 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxval_r16.c b/libgfortran/generated/maxval_r16.c index ccd0f4b..3645e1c 100644 --- a/libgfortran/generated/maxval_r16.c +++ b/libgfortran/generated/maxval_r16.c @@ -234,6 +234,16 @@ mmaxval_r16 (gfc_array_r16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxval_r16 (retarray, array, pdim, back); +#else + maxval_r16 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +451,7 @@ smaxval_r16 (gfc_array_r16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxval_r16 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxval_r4.c b/libgfortran/generated/maxval_r4.c index 2c26b6e..1f0a70e 100644 --- a/libgfortran/generated/maxval_r4.c +++ b/libgfortran/generated/maxval_r4.c @@ -234,6 +234,16 @@ mmaxval_r4 (gfc_array_r4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxval_r4 (retarray, array, pdim, back); +#else + maxval_r4 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +451,7 @@ smaxval_r4 (gfc_array_r4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxval_r4 (retarray, array, pdim, back); diff --git a/libgfortran/generated/maxval_r8.c b/libgfortran/generated/maxval_r8.c index 26efe0e..a4536ea 100644 --- a/libgfortran/generated/maxval_r8.c +++ b/libgfortran/generated/maxval_r8.c @@ -234,6 +234,16 @@ mmaxval_r8 (gfc_array_r8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + maxval_r8 (retarray, array, pdim, back); +#else + maxval_r8 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +451,7 @@ smaxval_r8 (gfc_array_r8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG maxval_r8 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minloc0_16_i1.c b/libgfortran/generated/minloc0_16_i1.c index 6a1a99a..f3df7e6 100644 --- a/libgfortran/generated/minloc0_16_i1.c +++ b/libgfortran/generated/minloc0_16_i1.c @@ -198,6 +198,13 @@ mminloc0_16_i1 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + minloc0_16_i1 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -368,7 +375,7 @@ sminloc0_16_i1 (gfc_array_i16 * const restrict retarray, index_type n; GFC_INTEGER_16 *dest; - if (*mask) + if (mask == NULL || *mask) { minloc0_16_i1 (retarray, array, back); return; diff --git a/libgfortran/generated/minloc0_16_i16.c b/libgfortran/generated/minloc0_16_i16.c index cde4b42..01dd0a2 100644 --- a/libgfortran/generated/minloc0_16_i16.c +++ b/libgfortran/generated/minloc0_16_i16.c @@ -198,6 +198,13 @@ mminloc0_16_i16 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + minloc0_16_i16 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -368,7 +375,7 @@ sminloc0_16_i16 (gfc_array_i16 * const restrict retarray, index_type n; GFC_INTEGER_16 *dest; - if (*mask) + if (mask == NULL || *mask) { minloc0_16_i16 (retarray, array, back); return; diff --git a/libgfortran/generated/minloc0_16_i2.c b/libgfortran/generated/minloc0_16_i2.c index 49fd91e..95763d7 100644 --- a/libgfortran/generated/minloc0_16_i2.c +++ b/libgfortran/generated/minloc0_16_i2.c @@ -198,6 +198,13 @@ mminloc0_16_i2 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + minloc0_16_i2 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -368,7 +375,7 @@ sminloc0_16_i2 (gfc_array_i16 * const restrict retarray, index_type n; GFC_INTEGER_16 *dest; - if (*mask) + if (mask == NULL || *mask) { minloc0_16_i2 (retarray, array, back); return; diff --git a/libgfortran/generated/minloc0_16_i4.c b/libgfortran/generated/minloc0_16_i4.c index 1bfc0f7..1965ef5 100644 --- a/libgfortran/generated/minloc0_16_i4.c +++ b/libgfortran/generated/minloc0_16_i4.c @@ -198,6 +198,13 @@ mminloc0_16_i4 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + minloc0_16_i4 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -368,7 +375,7 @@ sminloc0_16_i4 (gfc_array_i16 * const restrict retarray, index_type n; GFC_INTEGER_16 *dest; - if (*mask) + if (mask == NULL || *mask) { minloc0_16_i4 (retarray, array, back); return; diff --git a/libgfortran/generated/minloc0_16_i8.c b/libgfortran/generated/minloc0_16_i8.c index b4d54ae..a2ae359 100644 --- a/libgfortran/generated/minloc0_16_i8.c +++ b/libgfortran/generated/minloc0_16_i8.c @@ -198,6 +198,13 @@ mminloc0_16_i8 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + minloc0_16_i8 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -368,7 +375,7 @@ sminloc0_16_i8 (gfc_array_i16 * const restrict retarray, index_type n; GFC_INTEGER_16 *dest; - if (*mask) + if (mask == NULL || *mask) { minloc0_16_i8 (retarray, array, back); return; diff --git a/libgfortran/generated/minloc0_16_r10.c b/libgfortran/generated/minloc0_16_r10.c index 351d808..206cd32 100644 --- a/libgfortran/generated/minloc0_16_r10.c +++ b/libgfortran/generated/minloc0_16_r10.c @@ -198,6 +198,13 @@ mminloc0_16_r10 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + minloc0_16_r10 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -368,7 +375,7 @@ sminloc0_16_r10 (gfc_array_i16 * const restrict retarray, index_type n; GFC_INTEGER_16 *dest; - if (*mask) + if (mask == NULL || *mask) { minloc0_16_r10 (retarray, array, back); return; diff --git a/libgfortran/generated/minloc0_16_r16.c b/libgfortran/generated/minloc0_16_r16.c index 5a719f4..25559bb 100644 --- a/libgfortran/generated/minloc0_16_r16.c +++ b/libgfortran/generated/minloc0_16_r16.c @@ -198,6 +198,13 @@ mminloc0_16_r16 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + minloc0_16_r16 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -368,7 +375,7 @@ sminloc0_16_r16 (gfc_array_i16 * const restrict retarray, index_type n; GFC_INTEGER_16 *dest; - if (*mask) + if (mask == NULL || *mask) { minloc0_16_r16 (retarray, array, back); return; diff --git a/libgfortran/generated/minloc0_16_r4.c b/libgfortran/generated/minloc0_16_r4.c index ddeac3d..90034da 100644 --- a/libgfortran/generated/minloc0_16_r4.c +++ b/libgfortran/generated/minloc0_16_r4.c @@ -198,6 +198,13 @@ mminloc0_16_r4 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + minloc0_16_r4 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -368,7 +375,7 @@ sminloc0_16_r4 (gfc_array_i16 * const restrict retarray, index_type n; GFC_INTEGER_16 *dest; - if (*mask) + if (mask == NULL || *mask) { minloc0_16_r4 (retarray, array, back); return; diff --git a/libgfortran/generated/minloc0_16_r8.c b/libgfortran/generated/minloc0_16_r8.c index c09a160..3dc777f 100644 --- a/libgfortran/generated/minloc0_16_r8.c +++ b/libgfortran/generated/minloc0_16_r8.c @@ -198,6 +198,13 @@ mminloc0_16_r8 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + minloc0_16_r8 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -368,7 +375,7 @@ sminloc0_16_r8 (gfc_array_i16 * const restrict retarray, index_type n; GFC_INTEGER_16 *dest; - if (*mask) + if (mask == NULL || *mask) { minloc0_16_r8 (retarray, array, back); return; diff --git a/libgfortran/generated/minloc0_16_s1.c b/libgfortran/generated/minloc0_16_s1.c index 66fa30c..1b2ee30 100644 --- a/libgfortran/generated/minloc0_16_s1.c +++ b/libgfortran/generated/minloc0_16_s1.c @@ -174,6 +174,16 @@ mminloc0_16_s1 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc0_16_s1 (retarray, array, back, len); +#else + minloc0_16_s1 (retarray, array, len); +#endif + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -304,7 +314,7 @@ sminloc0_16_s1 (gfc_array_i16 * const restrict retarray, index_type n; GFC_INTEGER_16 *dest; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc0_16_s1 (retarray, array, back, len); diff --git a/libgfortran/generated/minloc0_16_s4.c b/libgfortran/generated/minloc0_16_s4.c index 378990c..63b91c8 100644 --- a/libgfortran/generated/minloc0_16_s4.c +++ b/libgfortran/generated/minloc0_16_s4.c @@ -174,6 +174,16 @@ mminloc0_16_s4 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc0_16_s4 (retarray, array, back, len); +#else + minloc0_16_s4 (retarray, array, len); +#endif + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -304,7 +314,7 @@ sminloc0_16_s4 (gfc_array_i16 * const restrict retarray, index_type n; GFC_INTEGER_16 *dest; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc0_16_s4 (retarray, array, back, len); diff --git a/libgfortran/generated/minloc0_4_i1.c b/libgfortran/generated/minloc0_4_i1.c index c0f89a8..0783f9e 100644 --- a/libgfortran/generated/minloc0_4_i1.c +++ b/libgfortran/generated/minloc0_4_i1.c @@ -198,6 +198,13 @@ mminloc0_4_i1 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + minloc0_4_i1 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -368,7 +375,7 @@ sminloc0_4_i1 (gfc_array_i4 * const restrict retarray, index_type n; GFC_INTEGER_4 *dest; - if (*mask) + if (mask == NULL || *mask) { minloc0_4_i1 (retarray, array, back); return; diff --git a/libgfortran/generated/minloc0_4_i16.c b/libgfortran/generated/minloc0_4_i16.c index dbcaf83..1388531 100644 --- a/libgfortran/generated/minloc0_4_i16.c +++ b/libgfortran/generated/minloc0_4_i16.c @@ -198,6 +198,13 @@ mminloc0_4_i16 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + minloc0_4_i16 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -368,7 +375,7 @@ sminloc0_4_i16 (gfc_array_i4 * const restrict retarray, index_type n; GFC_INTEGER_4 *dest; - if (*mask) + if (mask == NULL || *mask) { minloc0_4_i16 (retarray, array, back); return; diff --git a/libgfortran/generated/minloc0_4_i2.c b/libgfortran/generated/minloc0_4_i2.c index dbd3e4c..23900f2 100644 --- a/libgfortran/generated/minloc0_4_i2.c +++ b/libgfortran/generated/minloc0_4_i2.c @@ -198,6 +198,13 @@ mminloc0_4_i2 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + minloc0_4_i2 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -368,7 +375,7 @@ sminloc0_4_i2 (gfc_array_i4 * const restrict retarray, index_type n; GFC_INTEGER_4 *dest; - if (*mask) + if (mask == NULL || *mask) { minloc0_4_i2 (retarray, array, back); return; diff --git a/libgfortran/generated/minloc0_4_i4.c b/libgfortran/generated/minloc0_4_i4.c index d2c6a91..7c65389 100644 --- a/libgfortran/generated/minloc0_4_i4.c +++ b/libgfortran/generated/minloc0_4_i4.c @@ -198,6 +198,13 @@ mminloc0_4_i4 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + minloc0_4_i4 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -368,7 +375,7 @@ sminloc0_4_i4 (gfc_array_i4 * const restrict retarray, index_type n; GFC_INTEGER_4 *dest; - if (*mask) + if (mask == NULL || *mask) { minloc0_4_i4 (retarray, array, back); return; diff --git a/libgfortran/generated/minloc0_4_i8.c b/libgfortran/generated/minloc0_4_i8.c index 4d38e2c..6af912e 100644 --- a/libgfortran/generated/minloc0_4_i8.c +++ b/libgfortran/generated/minloc0_4_i8.c @@ -198,6 +198,13 @@ mminloc0_4_i8 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + minloc0_4_i8 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -368,7 +375,7 @@ sminloc0_4_i8 (gfc_array_i4 * const restrict retarray, index_type n; GFC_INTEGER_4 *dest; - if (*mask) + if (mask == NULL || *mask) { minloc0_4_i8 (retarray, array, back); return; diff --git a/libgfortran/generated/minloc0_4_r10.c b/libgfortran/generated/minloc0_4_r10.c index b9f68e4..f6351f8 100644 --- a/libgfortran/generated/minloc0_4_r10.c +++ b/libgfortran/generated/minloc0_4_r10.c @@ -198,6 +198,13 @@ mminloc0_4_r10 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + minloc0_4_r10 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -368,7 +375,7 @@ sminloc0_4_r10 (gfc_array_i4 * const restrict retarray, index_type n; GFC_INTEGER_4 *dest; - if (*mask) + if (mask == NULL || *mask) { minloc0_4_r10 (retarray, array, back); return; diff --git a/libgfortran/generated/minloc0_4_r16.c b/libgfortran/generated/minloc0_4_r16.c index 075ae44..7232cef 100644 --- a/libgfortran/generated/minloc0_4_r16.c +++ b/libgfortran/generated/minloc0_4_r16.c @@ -198,6 +198,13 @@ mminloc0_4_r16 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + minloc0_4_r16 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -368,7 +375,7 @@ sminloc0_4_r16 (gfc_array_i4 * const restrict retarray, index_type n; GFC_INTEGER_4 *dest; - if (*mask) + if (mask == NULL || *mask) { minloc0_4_r16 (retarray, array, back); return; diff --git a/libgfortran/generated/minloc0_4_r4.c b/libgfortran/generated/minloc0_4_r4.c index e94599b..52d04b4 100644 --- a/libgfortran/generated/minloc0_4_r4.c +++ b/libgfortran/generated/minloc0_4_r4.c @@ -198,6 +198,13 @@ mminloc0_4_r4 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + minloc0_4_r4 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -368,7 +375,7 @@ sminloc0_4_r4 (gfc_array_i4 * const restrict retarray, index_type n; GFC_INTEGER_4 *dest; - if (*mask) + if (mask == NULL || *mask) { minloc0_4_r4 (retarray, array, back); return; diff --git a/libgfortran/generated/minloc0_4_r8.c b/libgfortran/generated/minloc0_4_r8.c index 5208890..1a7f5cb 100644 --- a/libgfortran/generated/minloc0_4_r8.c +++ b/libgfortran/generated/minloc0_4_r8.c @@ -198,6 +198,13 @@ mminloc0_4_r8 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + minloc0_4_r8 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -368,7 +375,7 @@ sminloc0_4_r8 (gfc_array_i4 * const restrict retarray, index_type n; GFC_INTEGER_4 *dest; - if (*mask) + if (mask == NULL || *mask) { minloc0_4_r8 (retarray, array, back); return; diff --git a/libgfortran/generated/minloc0_4_s1.c b/libgfortran/generated/minloc0_4_s1.c index c2615d2..79e7e7d 100644 --- a/libgfortran/generated/minloc0_4_s1.c +++ b/libgfortran/generated/minloc0_4_s1.c @@ -174,6 +174,16 @@ mminloc0_4_s1 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc0_4_s1 (retarray, array, back, len); +#else + minloc0_4_s1 (retarray, array, len); +#endif + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -304,7 +314,7 @@ sminloc0_4_s1 (gfc_array_i4 * const restrict retarray, index_type n; GFC_INTEGER_4 *dest; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc0_4_s1 (retarray, array, back, len); diff --git a/libgfortran/generated/minloc0_4_s4.c b/libgfortran/generated/minloc0_4_s4.c index 5568cdb..e1e0344 100644 --- a/libgfortran/generated/minloc0_4_s4.c +++ b/libgfortran/generated/minloc0_4_s4.c @@ -174,6 +174,16 @@ mminloc0_4_s4 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc0_4_s4 (retarray, array, back, len); +#else + minloc0_4_s4 (retarray, array, len); +#endif + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -304,7 +314,7 @@ sminloc0_4_s4 (gfc_array_i4 * const restrict retarray, index_type n; GFC_INTEGER_4 *dest; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc0_4_s4 (retarray, array, back, len); diff --git a/libgfortran/generated/minloc0_8_i1.c b/libgfortran/generated/minloc0_8_i1.c index bd2f283..31525c3 100644 --- a/libgfortran/generated/minloc0_8_i1.c +++ b/libgfortran/generated/minloc0_8_i1.c @@ -198,6 +198,13 @@ mminloc0_8_i1 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + minloc0_8_i1 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -368,7 +375,7 @@ sminloc0_8_i1 (gfc_array_i8 * const restrict retarray, index_type n; GFC_INTEGER_8 *dest; - if (*mask) + if (mask == NULL || *mask) { minloc0_8_i1 (retarray, array, back); return; diff --git a/libgfortran/generated/minloc0_8_i16.c b/libgfortran/generated/minloc0_8_i16.c index cf364b6..c17cfc0 100644 --- a/libgfortran/generated/minloc0_8_i16.c +++ b/libgfortran/generated/minloc0_8_i16.c @@ -198,6 +198,13 @@ mminloc0_8_i16 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + minloc0_8_i16 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -368,7 +375,7 @@ sminloc0_8_i16 (gfc_array_i8 * const restrict retarray, index_type n; GFC_INTEGER_8 *dest; - if (*mask) + if (mask == NULL || *mask) { minloc0_8_i16 (retarray, array, back); return; diff --git a/libgfortran/generated/minloc0_8_i2.c b/libgfortran/generated/minloc0_8_i2.c index 244b7ee..bb0ec3a 100644 --- a/libgfortran/generated/minloc0_8_i2.c +++ b/libgfortran/generated/minloc0_8_i2.c @@ -198,6 +198,13 @@ mminloc0_8_i2 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + minloc0_8_i2 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -368,7 +375,7 @@ sminloc0_8_i2 (gfc_array_i8 * const restrict retarray, index_type n; GFC_INTEGER_8 *dest; - if (*mask) + if (mask == NULL || *mask) { minloc0_8_i2 (retarray, array, back); return; diff --git a/libgfortran/generated/minloc0_8_i4.c b/libgfortran/generated/minloc0_8_i4.c index 9d703d8..fe4427f 100644 --- a/libgfortran/generated/minloc0_8_i4.c +++ b/libgfortran/generated/minloc0_8_i4.c @@ -198,6 +198,13 @@ mminloc0_8_i4 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + minloc0_8_i4 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -368,7 +375,7 @@ sminloc0_8_i4 (gfc_array_i8 * const restrict retarray, index_type n; GFC_INTEGER_8 *dest; - if (*mask) + if (mask == NULL || *mask) { minloc0_8_i4 (retarray, array, back); return; diff --git a/libgfortran/generated/minloc0_8_i8.c b/libgfortran/generated/minloc0_8_i8.c index 2307c87..ee61838 100644 --- a/libgfortran/generated/minloc0_8_i8.c +++ b/libgfortran/generated/minloc0_8_i8.c @@ -198,6 +198,13 @@ mminloc0_8_i8 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + minloc0_8_i8 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -368,7 +375,7 @@ sminloc0_8_i8 (gfc_array_i8 * const restrict retarray, index_type n; GFC_INTEGER_8 *dest; - if (*mask) + if (mask == NULL || *mask) { minloc0_8_i8 (retarray, array, back); return; diff --git a/libgfortran/generated/minloc0_8_r10.c b/libgfortran/generated/minloc0_8_r10.c index 5fe9996..07fdaf4 100644 --- a/libgfortran/generated/minloc0_8_r10.c +++ b/libgfortran/generated/minloc0_8_r10.c @@ -198,6 +198,13 @@ mminloc0_8_r10 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + minloc0_8_r10 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -368,7 +375,7 @@ sminloc0_8_r10 (gfc_array_i8 * const restrict retarray, index_type n; GFC_INTEGER_8 *dest; - if (*mask) + if (mask == NULL || *mask) { minloc0_8_r10 (retarray, array, back); return; diff --git a/libgfortran/generated/minloc0_8_r16.c b/libgfortran/generated/minloc0_8_r16.c index d6c7318..489cb35 100644 --- a/libgfortran/generated/minloc0_8_r16.c +++ b/libgfortran/generated/minloc0_8_r16.c @@ -198,6 +198,13 @@ mminloc0_8_r16 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + minloc0_8_r16 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -368,7 +375,7 @@ sminloc0_8_r16 (gfc_array_i8 * const restrict retarray, index_type n; GFC_INTEGER_8 *dest; - if (*mask) + if (mask == NULL || *mask) { minloc0_8_r16 (retarray, array, back); return; diff --git a/libgfortran/generated/minloc0_8_r4.c b/libgfortran/generated/minloc0_8_r4.c index 4a7e163..781ebc1 100644 --- a/libgfortran/generated/minloc0_8_r4.c +++ b/libgfortran/generated/minloc0_8_r4.c @@ -198,6 +198,13 @@ mminloc0_8_r4 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + minloc0_8_r4 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -368,7 +375,7 @@ sminloc0_8_r4 (gfc_array_i8 * const restrict retarray, index_type n; GFC_INTEGER_8 *dest; - if (*mask) + if (mask == NULL || *mask) { minloc0_8_r4 (retarray, array, back); return; diff --git a/libgfortran/generated/minloc0_8_r8.c b/libgfortran/generated/minloc0_8_r8.c index fefd0e7..823babd 100644 --- a/libgfortran/generated/minloc0_8_r8.c +++ b/libgfortran/generated/minloc0_8_r8.c @@ -198,6 +198,13 @@ mminloc0_8_r8 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + + if (mask == NULL) + { + minloc0_8_r8 (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -368,7 +375,7 @@ sminloc0_8_r8 (gfc_array_i8 * const restrict retarray, index_type n; GFC_INTEGER_8 *dest; - if (*mask) + if (mask == NULL || *mask) { minloc0_8_r8 (retarray, array, back); return; diff --git a/libgfortran/generated/minloc0_8_s1.c b/libgfortran/generated/minloc0_8_s1.c index e22f4f9..0768abc 100644 --- a/libgfortran/generated/minloc0_8_s1.c +++ b/libgfortran/generated/minloc0_8_s1.c @@ -174,6 +174,16 @@ mminloc0_8_s1 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc0_8_s1 (retarray, array, back, len); +#else + minloc0_8_s1 (retarray, array, len); +#endif + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -304,7 +314,7 @@ sminloc0_8_s1 (gfc_array_i8 * const restrict retarray, index_type n; GFC_INTEGER_8 *dest; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc0_8_s1 (retarray, array, back, len); diff --git a/libgfortran/generated/minloc0_8_s4.c b/libgfortran/generated/minloc0_8_s4.c index 52ca057..6e49c1f 100644 --- a/libgfortran/generated/minloc0_8_s4.c +++ b/libgfortran/generated/minloc0_8_s4.c @@ -174,6 +174,16 @@ mminloc0_8_s4 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc0_8_s4 (retarray, array, back, len); +#else + minloc0_8_s4 (retarray, array, len); +#endif + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -304,7 +314,7 @@ sminloc0_8_s4 (gfc_array_i8 * const restrict retarray, index_type n; GFC_INTEGER_8 *dest; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc0_8_s4 (retarray, array, back, len); diff --git a/libgfortran/generated/minloc1_16_i1.c b/libgfortran/generated/minloc1_16_i1.c index 5e6a604..796cc68 100644 --- a/libgfortran/generated/minloc1_16_i1.c +++ b/libgfortran/generated/minloc1_16_i1.c @@ -258,6 +258,16 @@ mminloc1_16_i1 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_16_i1 (retarray, array, pdim, back); +#else + minloc1_16_i1 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -480,7 +490,7 @@ sminloc1_16_i1 (gfc_array_i16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_16_i1 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minloc1_16_i16.c b/libgfortran/generated/minloc1_16_i16.c index 2ba76f8..47daa2a 100644 --- a/libgfortran/generated/minloc1_16_i16.c +++ b/libgfortran/generated/minloc1_16_i16.c @@ -258,6 +258,16 @@ mminloc1_16_i16 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_16_i16 (retarray, array, pdim, back); +#else + minloc1_16_i16 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -480,7 +490,7 @@ sminloc1_16_i16 (gfc_array_i16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_16_i16 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minloc1_16_i2.c b/libgfortran/generated/minloc1_16_i2.c index fad47c2..db7b2b2 100644 --- a/libgfortran/generated/minloc1_16_i2.c +++ b/libgfortran/generated/minloc1_16_i2.c @@ -258,6 +258,16 @@ mminloc1_16_i2 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_16_i2 (retarray, array, pdim, back); +#else + minloc1_16_i2 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -480,7 +490,7 @@ sminloc1_16_i2 (gfc_array_i16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_16_i2 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minloc1_16_i4.c b/libgfortran/generated/minloc1_16_i4.c index 5be2114..7a5a69d 100644 --- a/libgfortran/generated/minloc1_16_i4.c +++ b/libgfortran/generated/minloc1_16_i4.c @@ -258,6 +258,16 @@ mminloc1_16_i4 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_16_i4 (retarray, array, pdim, back); +#else + minloc1_16_i4 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -480,7 +490,7 @@ sminloc1_16_i4 (gfc_array_i16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_16_i4 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minloc1_16_i8.c b/libgfortran/generated/minloc1_16_i8.c index d1fa3ff..270ee87 100644 --- a/libgfortran/generated/minloc1_16_i8.c +++ b/libgfortran/generated/minloc1_16_i8.c @@ -258,6 +258,16 @@ mminloc1_16_i8 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_16_i8 (retarray, array, pdim, back); +#else + minloc1_16_i8 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -480,7 +490,7 @@ sminloc1_16_i8 (gfc_array_i16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_16_i8 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minloc1_16_r10.c b/libgfortran/generated/minloc1_16_r10.c index d09b078..e1b8900 100644 --- a/libgfortran/generated/minloc1_16_r10.c +++ b/libgfortran/generated/minloc1_16_r10.c @@ -258,6 +258,16 @@ mminloc1_16_r10 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_16_r10 (retarray, array, pdim, back); +#else + minloc1_16_r10 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -480,7 +490,7 @@ sminloc1_16_r10 (gfc_array_i16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_16_r10 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minloc1_16_r16.c b/libgfortran/generated/minloc1_16_r16.c index 356d789..813137c 100644 --- a/libgfortran/generated/minloc1_16_r16.c +++ b/libgfortran/generated/minloc1_16_r16.c @@ -258,6 +258,16 @@ mminloc1_16_r16 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_16_r16 (retarray, array, pdim, back); +#else + minloc1_16_r16 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -480,7 +490,7 @@ sminloc1_16_r16 (gfc_array_i16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_16_r16 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minloc1_16_r4.c b/libgfortran/generated/minloc1_16_r4.c index 2783b80..c6909d6 100644 --- a/libgfortran/generated/minloc1_16_r4.c +++ b/libgfortran/generated/minloc1_16_r4.c @@ -258,6 +258,16 @@ mminloc1_16_r4 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_16_r4 (retarray, array, pdim, back); +#else + minloc1_16_r4 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -480,7 +490,7 @@ sminloc1_16_r4 (gfc_array_i16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_16_r4 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minloc1_16_r8.c b/libgfortran/generated/minloc1_16_r8.c index f9c46b0..1b83991 100644 --- a/libgfortran/generated/minloc1_16_r8.c +++ b/libgfortran/generated/minloc1_16_r8.c @@ -258,6 +258,16 @@ mminloc1_16_r8 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_16_r8 (retarray, array, pdim, back); +#else + minloc1_16_r8 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -480,7 +490,7 @@ sminloc1_16_r8 (gfc_array_i16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_16_r8 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minloc1_16_s1.c b/libgfortran/generated/minloc1_16_s1.c index b0cb8be..990ead0 100644 --- a/libgfortran/generated/minloc1_16_s1.c +++ b/libgfortran/generated/minloc1_16_s1.c @@ -241,6 +241,16 @@ mminloc1_16_s1 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_16_s1 (retarray, array, pdim, back, string_len); +#else + minloc1_16_s1 (retarray, array, pdim, string_len); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -436,7 +446,7 @@ sminloc1_16_s1 (gfc_array_i16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_16_s1 (retarray, array, pdim, back, string_len); diff --git a/libgfortran/generated/minloc1_16_s4.c b/libgfortran/generated/minloc1_16_s4.c index b422262..c5a7e97 100644 --- a/libgfortran/generated/minloc1_16_s4.c +++ b/libgfortran/generated/minloc1_16_s4.c @@ -241,6 +241,16 @@ mminloc1_16_s4 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_16_s4 (retarray, array, pdim, back, string_len); +#else + minloc1_16_s4 (retarray, array, pdim, string_len); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -436,7 +446,7 @@ sminloc1_16_s4 (gfc_array_i16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_16_s4 (retarray, array, pdim, back, string_len); diff --git a/libgfortran/generated/minloc1_4_i1.c b/libgfortran/generated/minloc1_4_i1.c index 92496affb..61ab0fa 100644 --- a/libgfortran/generated/minloc1_4_i1.c +++ b/libgfortran/generated/minloc1_4_i1.c @@ -258,6 +258,16 @@ mminloc1_4_i1 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_4_i1 (retarray, array, pdim, back); +#else + minloc1_4_i1 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -480,7 +490,7 @@ sminloc1_4_i1 (gfc_array_i4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_4_i1 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minloc1_4_i16.c b/libgfortran/generated/minloc1_4_i16.c index c0b91cf..38b1141 100644 --- a/libgfortran/generated/minloc1_4_i16.c +++ b/libgfortran/generated/minloc1_4_i16.c @@ -258,6 +258,16 @@ mminloc1_4_i16 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_4_i16 (retarray, array, pdim, back); +#else + minloc1_4_i16 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -480,7 +490,7 @@ sminloc1_4_i16 (gfc_array_i4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_4_i16 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minloc1_4_i2.c b/libgfortran/generated/minloc1_4_i2.c index 4defa8d..3bd8390 100644 --- a/libgfortran/generated/minloc1_4_i2.c +++ b/libgfortran/generated/minloc1_4_i2.c @@ -258,6 +258,16 @@ mminloc1_4_i2 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_4_i2 (retarray, array, pdim, back); +#else + minloc1_4_i2 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -480,7 +490,7 @@ sminloc1_4_i2 (gfc_array_i4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_4_i2 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minloc1_4_i4.c b/libgfortran/generated/minloc1_4_i4.c index 5bf3ec1..3e04578 100644 --- a/libgfortran/generated/minloc1_4_i4.c +++ b/libgfortran/generated/minloc1_4_i4.c @@ -258,6 +258,16 @@ mminloc1_4_i4 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_4_i4 (retarray, array, pdim, back); +#else + minloc1_4_i4 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -480,7 +490,7 @@ sminloc1_4_i4 (gfc_array_i4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_4_i4 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minloc1_4_i8.c b/libgfortran/generated/minloc1_4_i8.c index c676fcc..5c4921d 100644 --- a/libgfortran/generated/minloc1_4_i8.c +++ b/libgfortran/generated/minloc1_4_i8.c @@ -258,6 +258,16 @@ mminloc1_4_i8 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_4_i8 (retarray, array, pdim, back); +#else + minloc1_4_i8 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -480,7 +490,7 @@ sminloc1_4_i8 (gfc_array_i4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_4_i8 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minloc1_4_r10.c b/libgfortran/generated/minloc1_4_r10.c index 167f268..a1305ee 100644 --- a/libgfortran/generated/minloc1_4_r10.c +++ b/libgfortran/generated/minloc1_4_r10.c @@ -258,6 +258,16 @@ mminloc1_4_r10 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_4_r10 (retarray, array, pdim, back); +#else + minloc1_4_r10 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -480,7 +490,7 @@ sminloc1_4_r10 (gfc_array_i4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_4_r10 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minloc1_4_r16.c b/libgfortran/generated/minloc1_4_r16.c index df2fc90..914f3c5 100644 --- a/libgfortran/generated/minloc1_4_r16.c +++ b/libgfortran/generated/minloc1_4_r16.c @@ -258,6 +258,16 @@ mminloc1_4_r16 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_4_r16 (retarray, array, pdim, back); +#else + minloc1_4_r16 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -480,7 +490,7 @@ sminloc1_4_r16 (gfc_array_i4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_4_r16 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minloc1_4_r4.c b/libgfortran/generated/minloc1_4_r4.c index 4d2a0b0..4b816d7 100644 --- a/libgfortran/generated/minloc1_4_r4.c +++ b/libgfortran/generated/minloc1_4_r4.c @@ -258,6 +258,16 @@ mminloc1_4_r4 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_4_r4 (retarray, array, pdim, back); +#else + minloc1_4_r4 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -480,7 +490,7 @@ sminloc1_4_r4 (gfc_array_i4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_4_r4 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minloc1_4_r8.c b/libgfortran/generated/minloc1_4_r8.c index 04fcfec..1da3aae 100644 --- a/libgfortran/generated/minloc1_4_r8.c +++ b/libgfortran/generated/minloc1_4_r8.c @@ -258,6 +258,16 @@ mminloc1_4_r8 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_4_r8 (retarray, array, pdim, back); +#else + minloc1_4_r8 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -480,7 +490,7 @@ sminloc1_4_r8 (gfc_array_i4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_4_r8 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minloc1_4_s1.c b/libgfortran/generated/minloc1_4_s1.c index 0a52c34..ce65300 100644 --- a/libgfortran/generated/minloc1_4_s1.c +++ b/libgfortran/generated/minloc1_4_s1.c @@ -241,6 +241,16 @@ mminloc1_4_s1 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_4_s1 (retarray, array, pdim, back, string_len); +#else + minloc1_4_s1 (retarray, array, pdim, string_len); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -436,7 +446,7 @@ sminloc1_4_s1 (gfc_array_i4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_4_s1 (retarray, array, pdim, back, string_len); diff --git a/libgfortran/generated/minloc1_4_s4.c b/libgfortran/generated/minloc1_4_s4.c index 0338f6a..ef41808 100644 --- a/libgfortran/generated/minloc1_4_s4.c +++ b/libgfortran/generated/minloc1_4_s4.c @@ -241,6 +241,16 @@ mminloc1_4_s4 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_4_s4 (retarray, array, pdim, back, string_len); +#else + minloc1_4_s4 (retarray, array, pdim, string_len); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -436,7 +446,7 @@ sminloc1_4_s4 (gfc_array_i4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_4_s4 (retarray, array, pdim, back, string_len); diff --git a/libgfortran/generated/minloc1_8_i1.c b/libgfortran/generated/minloc1_8_i1.c index 3eec08f..fd8c89e 100644 --- a/libgfortran/generated/minloc1_8_i1.c +++ b/libgfortran/generated/minloc1_8_i1.c @@ -258,6 +258,16 @@ mminloc1_8_i1 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_8_i1 (retarray, array, pdim, back); +#else + minloc1_8_i1 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -480,7 +490,7 @@ sminloc1_8_i1 (gfc_array_i8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_8_i1 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minloc1_8_i16.c b/libgfortran/generated/minloc1_8_i16.c index dbe4d32..9b746c4 100644 --- a/libgfortran/generated/minloc1_8_i16.c +++ b/libgfortran/generated/minloc1_8_i16.c @@ -258,6 +258,16 @@ mminloc1_8_i16 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_8_i16 (retarray, array, pdim, back); +#else + minloc1_8_i16 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -480,7 +490,7 @@ sminloc1_8_i16 (gfc_array_i8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_8_i16 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minloc1_8_i2.c b/libgfortran/generated/minloc1_8_i2.c index f20d138..50b8569 100644 --- a/libgfortran/generated/minloc1_8_i2.c +++ b/libgfortran/generated/minloc1_8_i2.c @@ -258,6 +258,16 @@ mminloc1_8_i2 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_8_i2 (retarray, array, pdim, back); +#else + minloc1_8_i2 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -480,7 +490,7 @@ sminloc1_8_i2 (gfc_array_i8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_8_i2 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minloc1_8_i4.c b/libgfortran/generated/minloc1_8_i4.c index 9d83cc0..a92af86 100644 --- a/libgfortran/generated/minloc1_8_i4.c +++ b/libgfortran/generated/minloc1_8_i4.c @@ -258,6 +258,16 @@ mminloc1_8_i4 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_8_i4 (retarray, array, pdim, back); +#else + minloc1_8_i4 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -480,7 +490,7 @@ sminloc1_8_i4 (gfc_array_i8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_8_i4 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minloc1_8_i8.c b/libgfortran/generated/minloc1_8_i8.c index b5d0eac..9c7d926 100644 --- a/libgfortran/generated/minloc1_8_i8.c +++ b/libgfortran/generated/minloc1_8_i8.c @@ -258,6 +258,16 @@ mminloc1_8_i8 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_8_i8 (retarray, array, pdim, back); +#else + minloc1_8_i8 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -480,7 +490,7 @@ sminloc1_8_i8 (gfc_array_i8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_8_i8 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minloc1_8_r10.c b/libgfortran/generated/minloc1_8_r10.c index a990567..bb30986 100644 --- a/libgfortran/generated/minloc1_8_r10.c +++ b/libgfortran/generated/minloc1_8_r10.c @@ -258,6 +258,16 @@ mminloc1_8_r10 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_8_r10 (retarray, array, pdim, back); +#else + minloc1_8_r10 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -480,7 +490,7 @@ sminloc1_8_r10 (gfc_array_i8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_8_r10 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minloc1_8_r16.c b/libgfortran/generated/minloc1_8_r16.c index 7fd7533..20ca352 100644 --- a/libgfortran/generated/minloc1_8_r16.c +++ b/libgfortran/generated/minloc1_8_r16.c @@ -258,6 +258,16 @@ mminloc1_8_r16 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_8_r16 (retarray, array, pdim, back); +#else + minloc1_8_r16 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -480,7 +490,7 @@ sminloc1_8_r16 (gfc_array_i8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_8_r16 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minloc1_8_r4.c b/libgfortran/generated/minloc1_8_r4.c index eadf4e1..eebb153 100644 --- a/libgfortran/generated/minloc1_8_r4.c +++ b/libgfortran/generated/minloc1_8_r4.c @@ -258,6 +258,16 @@ mminloc1_8_r4 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_8_r4 (retarray, array, pdim, back); +#else + minloc1_8_r4 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -480,7 +490,7 @@ sminloc1_8_r4 (gfc_array_i8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_8_r4 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minloc1_8_r8.c b/libgfortran/generated/minloc1_8_r8.c index 97c7796..58b3cda 100644 --- a/libgfortran/generated/minloc1_8_r8.c +++ b/libgfortran/generated/minloc1_8_r8.c @@ -258,6 +258,16 @@ mminloc1_8_r8 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_8_r8 (retarray, array, pdim, back); +#else + minloc1_8_r8 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -480,7 +490,7 @@ sminloc1_8_r8 (gfc_array_i8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_8_r8 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minloc1_8_s1.c b/libgfortran/generated/minloc1_8_s1.c index 2c38790..f53a590 100644 --- a/libgfortran/generated/minloc1_8_s1.c +++ b/libgfortran/generated/minloc1_8_s1.c @@ -241,6 +241,16 @@ mminloc1_8_s1 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_8_s1 (retarray, array, pdim, back, string_len); +#else + minloc1_8_s1 (retarray, array, pdim, string_len); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -436,7 +446,7 @@ sminloc1_8_s1 (gfc_array_i8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_8_s1 (retarray, array, pdim, back, string_len); diff --git a/libgfortran/generated/minloc1_8_s4.c b/libgfortran/generated/minloc1_8_s4.c index 59d2d6f..ff4ee8c 100644 --- a/libgfortran/generated/minloc1_8_s4.c +++ b/libgfortran/generated/minloc1_8_s4.c @@ -241,6 +241,16 @@ mminloc1_8_s4 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minloc1_8_s4 (retarray, array, pdim, back, string_len); +#else + minloc1_8_s4 (retarray, array, pdim, string_len); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -436,7 +446,7 @@ sminloc1_8_s4 (gfc_array_i8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minloc1_8_s4 (retarray, array, pdim, back, string_len); diff --git a/libgfortran/generated/minval0_s1.c b/libgfortran/generated/minval0_s1.c index a15b835..4f1d57e 100644 --- a/libgfortran/generated/minval0_s1.c +++ b/libgfortran/generated/minval0_s1.c @@ -150,6 +150,12 @@ mminval0_s1 (GFC_UINTEGER_1 * const restrict ret, index_type n; int mask_kind; + if (mask == NULL) + { + minval0_s1 (ret, xlen, array, len); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -247,7 +253,7 @@ sminval0_s1 (GFC_UINTEGER_1 * restrict ret, GFC_LOGICAL_4 *mask, gfc_charlen_type len) { - if (*mask) + if (mask == NULL || *mask) { minval0_s1 (ret, xlen, array, len); return; diff --git a/libgfortran/generated/minval0_s4.c b/libgfortran/generated/minval0_s4.c index 2b3c332..7a516b1 100644 --- a/libgfortran/generated/minval0_s4.c +++ b/libgfortran/generated/minval0_s4.c @@ -150,6 +150,12 @@ mminval0_s4 (GFC_UINTEGER_4 * const restrict ret, index_type n; int mask_kind; + if (mask == NULL) + { + minval0_s4 (ret, xlen, array, len); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -247,7 +253,7 @@ sminval0_s4 (GFC_UINTEGER_4 * restrict ret, GFC_LOGICAL_4 *mask, gfc_charlen_type len) { - if (*mask) + if (mask == NULL || *mask) { minval0_s4 (ret, xlen, array, len); return; diff --git a/libgfortran/generated/minval1_s1.c b/libgfortran/generated/minval1_s1.c index be747be..20ffa2c 100644 --- a/libgfortran/generated/minval1_s1.c +++ b/libgfortran/generated/minval1_s1.c @@ -239,6 +239,12 @@ mminval1_s1 (gfc_array_s1 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { + minval1_s1 (retarray, xlen, array, pdim, string_len); + return; + } + assert (xlen == string_len); dim = (*pdim) - 1; @@ -436,7 +442,7 @@ sminval1_s1 (gfc_array_s1 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { minval1_s1 (retarray, xlen, array, pdim, string_len); return; diff --git a/libgfortran/generated/minval1_s4.c b/libgfortran/generated/minval1_s4.c index abd449e..4e97192 100644 --- a/libgfortran/generated/minval1_s4.c +++ b/libgfortran/generated/minval1_s4.c @@ -239,6 +239,12 @@ mminval1_s4 (gfc_array_s4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { + minval1_s4 (retarray, xlen, array, pdim, string_len); + return; + } + assert (xlen == string_len); dim = (*pdim) - 1; @@ -436,7 +442,7 @@ sminval1_s4 (gfc_array_s4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { minval1_s4 (retarray, xlen, array, pdim, string_len); return; diff --git a/libgfortran/generated/minval_i1.c b/libgfortran/generated/minval_i1.c index 36e126d..a72d29d 100644 --- a/libgfortran/generated/minval_i1.c +++ b/libgfortran/generated/minval_i1.c @@ -234,6 +234,16 @@ mminval_i1 (gfc_array_i1 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minval_i1 (retarray, array, pdim, back); +#else + minval_i1 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +451,7 @@ sminval_i1 (gfc_array_i1 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minval_i1 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minval_i16.c b/libgfortran/generated/minval_i16.c index def6927..e08b7ee 100644 --- a/libgfortran/generated/minval_i16.c +++ b/libgfortran/generated/minval_i16.c @@ -234,6 +234,16 @@ mminval_i16 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minval_i16 (retarray, array, pdim, back); +#else + minval_i16 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +451,7 @@ sminval_i16 (gfc_array_i16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minval_i16 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minval_i2.c b/libgfortran/generated/minval_i2.c index d6f2a1e..50961c0 100644 --- a/libgfortran/generated/minval_i2.c +++ b/libgfortran/generated/minval_i2.c @@ -234,6 +234,16 @@ mminval_i2 (gfc_array_i2 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minval_i2 (retarray, array, pdim, back); +#else + minval_i2 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +451,7 @@ sminval_i2 (gfc_array_i2 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minval_i2 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minval_i4.c b/libgfortran/generated/minval_i4.c index ae62209..018fcc4 100644 --- a/libgfortran/generated/minval_i4.c +++ b/libgfortran/generated/minval_i4.c @@ -234,6 +234,16 @@ mminval_i4 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minval_i4 (retarray, array, pdim, back); +#else + minval_i4 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +451,7 @@ sminval_i4 (gfc_array_i4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minval_i4 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minval_i8.c b/libgfortran/generated/minval_i8.c index 76edbd6..4258efe 100644 --- a/libgfortran/generated/minval_i8.c +++ b/libgfortran/generated/minval_i8.c @@ -234,6 +234,16 @@ mminval_i8 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minval_i8 (retarray, array, pdim, back); +#else + minval_i8 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +451,7 @@ sminval_i8 (gfc_array_i8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minval_i8 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minval_r10.c b/libgfortran/generated/minval_r10.c index caf1e27..3655033 100644 --- a/libgfortran/generated/minval_r10.c +++ b/libgfortran/generated/minval_r10.c @@ -234,6 +234,16 @@ mminval_r10 (gfc_array_r10 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minval_r10 (retarray, array, pdim, back); +#else + minval_r10 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +451,7 @@ sminval_r10 (gfc_array_r10 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minval_r10 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minval_r16.c b/libgfortran/generated/minval_r16.c index fedbe68..bb9a995 100644 --- a/libgfortran/generated/minval_r16.c +++ b/libgfortran/generated/minval_r16.c @@ -234,6 +234,16 @@ mminval_r16 (gfc_array_r16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minval_r16 (retarray, array, pdim, back); +#else + minval_r16 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +451,7 @@ sminval_r16 (gfc_array_r16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minval_r16 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minval_r4.c b/libgfortran/generated/minval_r4.c index 0fe7ba1..4ad8eca 100644 --- a/libgfortran/generated/minval_r4.c +++ b/libgfortran/generated/minval_r4.c @@ -234,6 +234,16 @@ mminval_r4 (gfc_array_r4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minval_r4 (retarray, array, pdim, back); +#else + minval_r4 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +451,7 @@ sminval_r4 (gfc_array_r4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minval_r4 (retarray, array, pdim, back); diff --git a/libgfortran/generated/minval_r8.c b/libgfortran/generated/minval_r8.c index 85503c3..9d39bf6 100644 --- a/libgfortran/generated/minval_r8.c +++ b/libgfortran/generated/minval_r8.c @@ -234,6 +234,16 @@ mminval_r8 (gfc_array_r8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + minval_r8 (retarray, array, pdim, back); +#else + minval_r8 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +451,7 @@ sminval_r8 (gfc_array_r8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG minval_r8 (retarray, array, pdim, back); diff --git a/libgfortran/generated/product_c10.c b/libgfortran/generated/product_c10.c index 4cf81ac..71a255a 100644 --- a/libgfortran/generated/product_c10.c +++ b/libgfortran/generated/product_c10.c @@ -220,6 +220,16 @@ mproduct_c10 (gfc_array_c10 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + product_c10 (retarray, array, pdim, back); +#else + product_c10 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ sproduct_c10 (gfc_array_c10 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG product_c10 (retarray, array, pdim, back); diff --git a/libgfortran/generated/product_c16.c b/libgfortran/generated/product_c16.c index 5567379..9cb59ca 100644 --- a/libgfortran/generated/product_c16.c +++ b/libgfortran/generated/product_c16.c @@ -220,6 +220,16 @@ mproduct_c16 (gfc_array_c16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + product_c16 (retarray, array, pdim, back); +#else + product_c16 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ sproduct_c16 (gfc_array_c16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG product_c16 (retarray, array, pdim, back); diff --git a/libgfortran/generated/product_c4.c b/libgfortran/generated/product_c4.c index c9439c8..bfcb6b7 100644 --- a/libgfortran/generated/product_c4.c +++ b/libgfortran/generated/product_c4.c @@ -220,6 +220,16 @@ mproduct_c4 (gfc_array_c4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + product_c4 (retarray, array, pdim, back); +#else + product_c4 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ sproduct_c4 (gfc_array_c4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG product_c4 (retarray, array, pdim, back); diff --git a/libgfortran/generated/product_c8.c b/libgfortran/generated/product_c8.c index 94017ac..705b131 100644 --- a/libgfortran/generated/product_c8.c +++ b/libgfortran/generated/product_c8.c @@ -220,6 +220,16 @@ mproduct_c8 (gfc_array_c8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + product_c8 (retarray, array, pdim, back); +#else + product_c8 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ sproduct_c8 (gfc_array_c8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG product_c8 (retarray, array, pdim, back); diff --git a/libgfortran/generated/product_i1.c b/libgfortran/generated/product_i1.c index 62fe44c..0b40678 100644 --- a/libgfortran/generated/product_i1.c +++ b/libgfortran/generated/product_i1.c @@ -220,6 +220,16 @@ mproduct_i1 (gfc_array_i1 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + product_i1 (retarray, array, pdim, back); +#else + product_i1 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ sproduct_i1 (gfc_array_i1 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG product_i1 (retarray, array, pdim, back); diff --git a/libgfortran/generated/product_i16.c b/libgfortran/generated/product_i16.c index 487a8f2..6896a0e 100644 --- a/libgfortran/generated/product_i16.c +++ b/libgfortran/generated/product_i16.c @@ -220,6 +220,16 @@ mproduct_i16 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + product_i16 (retarray, array, pdim, back); +#else + product_i16 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ sproduct_i16 (gfc_array_i16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG product_i16 (retarray, array, pdim, back); diff --git a/libgfortran/generated/product_i2.c b/libgfortran/generated/product_i2.c index 1a7cf7e..a6423da 100644 --- a/libgfortran/generated/product_i2.c +++ b/libgfortran/generated/product_i2.c @@ -220,6 +220,16 @@ mproduct_i2 (gfc_array_i2 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + product_i2 (retarray, array, pdim, back); +#else + product_i2 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ sproduct_i2 (gfc_array_i2 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG product_i2 (retarray, array, pdim, back); diff --git a/libgfortran/generated/product_i4.c b/libgfortran/generated/product_i4.c index e70209b..fd1919c 100644 --- a/libgfortran/generated/product_i4.c +++ b/libgfortran/generated/product_i4.c @@ -220,6 +220,16 @@ mproduct_i4 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + product_i4 (retarray, array, pdim, back); +#else + product_i4 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ sproduct_i4 (gfc_array_i4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG product_i4 (retarray, array, pdim, back); diff --git a/libgfortran/generated/product_i8.c b/libgfortran/generated/product_i8.c index 0af1d0a..5cfeabc 100644 --- a/libgfortran/generated/product_i8.c +++ b/libgfortran/generated/product_i8.c @@ -220,6 +220,16 @@ mproduct_i8 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + product_i8 (retarray, array, pdim, back); +#else + product_i8 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ sproduct_i8 (gfc_array_i8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG product_i8 (retarray, array, pdim, back); diff --git a/libgfortran/generated/product_r10.c b/libgfortran/generated/product_r10.c index df92b05..28f3072 100644 --- a/libgfortran/generated/product_r10.c +++ b/libgfortran/generated/product_r10.c @@ -220,6 +220,16 @@ mproduct_r10 (gfc_array_r10 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + product_r10 (retarray, array, pdim, back); +#else + product_r10 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ sproduct_r10 (gfc_array_r10 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG product_r10 (retarray, array, pdim, back); diff --git a/libgfortran/generated/product_r16.c b/libgfortran/generated/product_r16.c index 45f3419..b10027f 100644 --- a/libgfortran/generated/product_r16.c +++ b/libgfortran/generated/product_r16.c @@ -220,6 +220,16 @@ mproduct_r16 (gfc_array_r16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + product_r16 (retarray, array, pdim, back); +#else + product_r16 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ sproduct_r16 (gfc_array_r16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG product_r16 (retarray, array, pdim, back); diff --git a/libgfortran/generated/product_r4.c b/libgfortran/generated/product_r4.c index 3aaff50..e09a43a 100644 --- a/libgfortran/generated/product_r4.c +++ b/libgfortran/generated/product_r4.c @@ -220,6 +220,16 @@ mproduct_r4 (gfc_array_r4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + product_r4 (retarray, array, pdim, back); +#else + product_r4 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ sproduct_r4 (gfc_array_r4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG product_r4 (retarray, array, pdim, back); diff --git a/libgfortran/generated/product_r8.c b/libgfortran/generated/product_r8.c index ba407bf..20068ed 100644 --- a/libgfortran/generated/product_r8.c +++ b/libgfortran/generated/product_r8.c @@ -220,6 +220,16 @@ mproduct_r8 (gfc_array_r8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + product_r8 (retarray, array, pdim, back); +#else + product_r8 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ sproduct_r8 (gfc_array_r8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG product_r8 (retarray, array, pdim, back); diff --git a/libgfortran/generated/sum_c10.c b/libgfortran/generated/sum_c10.c index e20b4ed..d7f1e73 100644 --- a/libgfortran/generated/sum_c10.c +++ b/libgfortran/generated/sum_c10.c @@ -220,6 +220,16 @@ msum_c10 (gfc_array_c10 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + sum_c10 (retarray, array, pdim, back); +#else + sum_c10 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ ssum_c10 (gfc_array_c10 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG sum_c10 (retarray, array, pdim, back); diff --git a/libgfortran/generated/sum_c16.c b/libgfortran/generated/sum_c16.c index 7ae41a3..d1414d3 100644 --- a/libgfortran/generated/sum_c16.c +++ b/libgfortran/generated/sum_c16.c @@ -220,6 +220,16 @@ msum_c16 (gfc_array_c16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + sum_c16 (retarray, array, pdim, back); +#else + sum_c16 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ ssum_c16 (gfc_array_c16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG sum_c16 (retarray, array, pdim, back); diff --git a/libgfortran/generated/sum_c4.c b/libgfortran/generated/sum_c4.c index 2b50f2f..d15a717 100644 --- a/libgfortran/generated/sum_c4.c +++ b/libgfortran/generated/sum_c4.c @@ -220,6 +220,16 @@ msum_c4 (gfc_array_c4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + sum_c4 (retarray, array, pdim, back); +#else + sum_c4 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ ssum_c4 (gfc_array_c4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG sum_c4 (retarray, array, pdim, back); diff --git a/libgfortran/generated/sum_c8.c b/libgfortran/generated/sum_c8.c index 5b41f54..55454e0 100644 --- a/libgfortran/generated/sum_c8.c +++ b/libgfortran/generated/sum_c8.c @@ -220,6 +220,16 @@ msum_c8 (gfc_array_c8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + sum_c8 (retarray, array, pdim, back); +#else + sum_c8 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ ssum_c8 (gfc_array_c8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG sum_c8 (retarray, array, pdim, back); diff --git a/libgfortran/generated/sum_i1.c b/libgfortran/generated/sum_i1.c index 3ff4ddc..4b6d277 100644 --- a/libgfortran/generated/sum_i1.c +++ b/libgfortran/generated/sum_i1.c @@ -220,6 +220,16 @@ msum_i1 (gfc_array_i1 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + sum_i1 (retarray, array, pdim, back); +#else + sum_i1 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ ssum_i1 (gfc_array_i1 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG sum_i1 (retarray, array, pdim, back); diff --git a/libgfortran/generated/sum_i16.c b/libgfortran/generated/sum_i16.c index 8027fe4..25bb2ad 100644 --- a/libgfortran/generated/sum_i16.c +++ b/libgfortran/generated/sum_i16.c @@ -220,6 +220,16 @@ msum_i16 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + sum_i16 (retarray, array, pdim, back); +#else + sum_i16 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ ssum_i16 (gfc_array_i16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG sum_i16 (retarray, array, pdim, back); diff --git a/libgfortran/generated/sum_i2.c b/libgfortran/generated/sum_i2.c index b0467ec..b6816d8 100644 --- a/libgfortran/generated/sum_i2.c +++ b/libgfortran/generated/sum_i2.c @@ -220,6 +220,16 @@ msum_i2 (gfc_array_i2 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + sum_i2 (retarray, array, pdim, back); +#else + sum_i2 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ ssum_i2 (gfc_array_i2 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG sum_i2 (retarray, array, pdim, back); diff --git a/libgfortran/generated/sum_i4.c b/libgfortran/generated/sum_i4.c index 0f5f836..63e807e 100644 --- a/libgfortran/generated/sum_i4.c +++ b/libgfortran/generated/sum_i4.c @@ -220,6 +220,16 @@ msum_i4 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + sum_i4 (retarray, array, pdim, back); +#else + sum_i4 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ ssum_i4 (gfc_array_i4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG sum_i4 (retarray, array, pdim, back); diff --git a/libgfortran/generated/sum_i8.c b/libgfortran/generated/sum_i8.c index 9c5c17b..a4557f6 100644 --- a/libgfortran/generated/sum_i8.c +++ b/libgfortran/generated/sum_i8.c @@ -220,6 +220,16 @@ msum_i8 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + sum_i8 (retarray, array, pdim, back); +#else + sum_i8 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ ssum_i8 (gfc_array_i8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG sum_i8 (retarray, array, pdim, back); diff --git a/libgfortran/generated/sum_r10.c b/libgfortran/generated/sum_r10.c index 201facc..863bcb6 100644 --- a/libgfortran/generated/sum_r10.c +++ b/libgfortran/generated/sum_r10.c @@ -220,6 +220,16 @@ msum_r10 (gfc_array_r10 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + sum_r10 (retarray, array, pdim, back); +#else + sum_r10 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ ssum_r10 (gfc_array_r10 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG sum_r10 (retarray, array, pdim, back); diff --git a/libgfortran/generated/sum_r16.c b/libgfortran/generated/sum_r16.c index 161a5f3..f7e98f3 100644 --- a/libgfortran/generated/sum_r16.c +++ b/libgfortran/generated/sum_r16.c @@ -220,6 +220,16 @@ msum_r16 (gfc_array_r16 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + sum_r16 (retarray, array, pdim, back); +#else + sum_r16 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ ssum_r16 (gfc_array_r16 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG sum_r16 (retarray, array, pdim, back); diff --git a/libgfortran/generated/sum_r4.c b/libgfortran/generated/sum_r4.c index 4228bde..a457910 100644 --- a/libgfortran/generated/sum_r4.c +++ b/libgfortran/generated/sum_r4.c @@ -220,6 +220,16 @@ msum_r4 (gfc_array_r4 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + sum_r4 (retarray, array, pdim, back); +#else + sum_r4 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ ssum_r4 (gfc_array_r4 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG sum_r4 (retarray, array, pdim, back); diff --git a/libgfortran/generated/sum_r8.c b/libgfortran/generated/sum_r8.c index 8d348328..4d1b5a0 100644 --- a/libgfortran/generated/sum_r8.c +++ b/libgfortran/generated/sum_r8.c @@ -220,6 +220,16 @@ msum_r8 (gfc_array_r8 * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + sum_r8 (retarray, array, pdim, back); +#else + sum_r8 (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +409,7 @@ ssum_r8 (gfc_array_r8 * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG sum_r8 (retarray, array, pdim, back); diff --git a/libgfortran/m4/ifindloc0.m4 b/libgfortran/m4/ifindloc0.m4 index 94937f1..75ec531 100644 --- a/libgfortran/m4/ifindloc0.m4 +++ b/libgfortran/m4/ifindloc0.m4 @@ -48,7 +48,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else { @@ -179,7 +179,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else { @@ -317,7 +317,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see index_type * restrict dest; index_type n; - if (*mask) + if (mask == NULL || *mask) { findloc0_'atype_code` (retarray, array, value, back'len_arg`); return; @@ -333,7 +333,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1); retarray->dtype.rank = 1; retarray->offset = 0; - retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (rank, sizeof (index_type)); } else if (unlikely (compile_options.bounds_check)) { diff --git a/libgfortran/m4/ifindloc1.m4 b/libgfortran/m4/ifindloc1.m4 index 70638be..f4a7099 100644 --- a/libgfortran/m4/ifindloc1.m4 +++ b/libgfortran/m4/ifindloc1.m4 @@ -95,7 +95,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ @@ -273,7 +273,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ @@ -379,7 +379,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see index_type dim; bool continue_loop; - if (*mask) + if (mask == NULL || *mask) { findloc1_'atype_code`'` (retarray, array, value, pdim, back'len_arg`'`); return; @@ -436,7 +436,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); + retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ diff --git a/libgfortran/m4/ifindloc2.m4 b/libgfortran/m4/ifindloc2.m4 index ede7041..d6d7851 100644 --- a/libgfortran/m4/ifindloc2.m4 +++ b/libgfortran/m4/ifindloc2.m4 @@ -117,7 +117,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see } 'header3`'` { - if (*mask) + if (mask == NULL || *mask) { return findloc2_'atype_code` (array, value, back, len_array, len_value); } diff --git a/libgfortran/m4/iforeach-s.m4 b/libgfortran/m4/iforeach-s.m4 index 19bb23b..b841d15 100644 --- a/libgfortran/m4/iforeach-s.m4 +++ b/libgfortran/m4/iforeach-s.m4 @@ -135,6 +135,16 @@ m'name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray, index_type n; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + name`'rtype_qual`_'atype_code (retarray, array, back, len); +#else + name`'rtype_qual`_'atype_code (retarray, array, len); +#endif + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -261,7 +271,7 @@ void index_type n; 'rtype_name *dest; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG name`'rtype_qual`_'atype_code (retarray, array, back, len); diff --git a/libgfortran/m4/iforeach-s2.m4 b/libgfortran/m4/iforeach-s2.m4 index 19d016f..63fde45 100644 --- a/libgfortran/m4/iforeach-s2.m4 +++ b/libgfortran/m4/iforeach-s2.m4 @@ -116,6 +116,12 @@ void index_type n; int mask_kind; + if (mask == NULL) + { + name`'rtype_qual`_'atype_code (ret, xlen, array, len); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -213,7 +219,7 @@ void GFC_LOGICAL_4 *mask, gfc_charlen_type len) { - if (*mask) + if (mask == NULL || *mask) { name`'rtype_qual`_'atype_code (ret, xlen, array, len); return; diff --git a/libgfortran/m4/iforeach.m4 b/libgfortran/m4/iforeach.m4 index dff9f8b..ede4a7f 100644 --- a/libgfortran/m4/iforeach.m4 +++ b/libgfortran/m4/iforeach.m4 @@ -123,6 +123,13 @@ void index_type n; int mask_kind; + + if (mask == NULL) + { + name`'rtype_qual`_'atype_code (retarray, array, back); + return; + } + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -247,7 +254,7 @@ void index_type n; rtype_name *dest; - if (*mask) + if (mask == NULL || *mask) { name`'rtype_qual`_'atype_code (retarray, array, back); return; diff --git a/libgfortran/m4/ifunction-s.m4 b/libgfortran/m4/ifunction-s.m4 index 55d6b18..16615aa 100644 --- a/libgfortran/m4/ifunction-s.m4 +++ b/libgfortran/m4/ifunction-s.m4 @@ -222,6 +222,16 @@ m'name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + name`'rtype_qual`_'atype_code (retarray, array, pdim, back, string_len); +#else + name`'rtype_qual`_'atype_code (retarray, array, pdim, string_len); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -400,7 +410,7 @@ s'name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray, index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG name`'rtype_qual`_'atype_code (retarray, array, pdim, back, string_len); diff --git a/libgfortran/m4/ifunction-s2.m4 b/libgfortran/m4/ifunction-s2.m4 index b4ce650..4d31c20 100644 --- a/libgfortran/m4/ifunction-s2.m4 +++ b/libgfortran/m4/ifunction-s2.m4 @@ -225,6 +225,12 @@ void index_type mdelta; int mask_kind; + if (mask == NULL) + { + name`'rtype_qual`_'atype_code (retarray, xlen, array, pdim, string_len); + return; + } + assert (xlen == string_len); dim = (*pdim) - 1; @@ -408,7 +414,7 @@ void index_type dim; - if (*mask) + if (mask == NULL || *mask) { name`'rtype_qual`_'atype_code (retarray, xlen, array, pdim, string_len); return; diff --git a/libgfortran/m4/ifunction.m4 b/libgfortran/m4/ifunction.m4 index 3b8d702..c64217e 100644 --- a/libgfortran/m4/ifunction.m4 +++ b/libgfortran/m4/ifunction.m4 @@ -210,6 +210,16 @@ m'name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray, index_type mdelta; int mask_kind; + if (mask == NULL) + { +#ifdef HAVE_BACK_ARG + name`'rtype_qual`_'atype_code (retarray, array, pdim, back); +#else + name`'rtype_qual`_'atype_code (retarray, array, pdim); +#endif + return; + } + dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -388,7 +398,7 @@ void index_type dim; - if (*mask) + if (mask == NULL || *mask) { #ifdef HAVE_BACK_ARG name`'rtype_qual`_'atype_code (retarray, array, pdim, back); |