diff options
author | pault <pault@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-03-13 22:49:56 +0000 |
---|---|---|
committer | pault <pault@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-03-13 22:49:56 +0000 |
commit | b1660f25a3a95c3fe3682faa921b21f7493356f8 (patch) | |
tree | c9b7df7a9552d154d8cf7e2055c0a2c433188f18 /libgfortran/generated/minloc0_8_i8.c | |
parent | 754a0dcdfd44d0512fd1382fbfdc7a71a5b9b0b9 (diff) | |
download | gcc-b1660f25a3a95c3fe3682faa921b21f7493356f8.tar.gz |
2006-03-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/25378
* trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Set the initial position to zero and
modify the condition for updating it, to implement the F2003 requirement for all(mask)
is false.
2006-03-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/25378
* libgfortran/m4/minloc1.m4: Set the initial position to zero and modify the condition for
updating it, to implement the F2003 requirement for all(mask).eq.false.
* libgfortran/m4/maxloc1.m4: The same.
* libgfortran/m4/iforeach.m4: The same.
* libgfortran/m4/minloc0.m4: The same.
* libgfortran/m4/maxloc0.m4: The same.
* libgfortran/generated/maxloc0_16_i16.c: Regenerated, together with 41 others.
* libgfortran/generated/minloc0_16_i16.c: Regenerated, together with 41 others.
2006-03-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/25378
* gfortran.fortran-torture/execute/intrinsic_mmloc_3.f90: Expand test to include more
permuatations of mask and index.
* testsuite/gfortran.dg/scalar_mask_1.f90: Modify last test to respond to F2003 spec.
that the position returned for an all false mask && condition is zero.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@112028 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/generated/minloc0_8_i8.c')
-rw-r--r-- | libgfortran/generated/minloc0_8_i8.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libgfortran/generated/minloc0_8_i8.c b/libgfortran/generated/minloc0_8_i8.c index b3fbaff5279..63dd21a7766 100644 --- a/libgfortran/generated/minloc0_8_i8.c +++ b/libgfortran/generated/minloc0_8_i8.c @@ -106,7 +106,7 @@ minloc0_8_i8 (gfc_array_i8 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_INTEGER_8 minval; @@ -118,7 +118,7 @@ minloc0_8_i8 (gfc_array_i8 * const restrict retarray, { /* Implementation start. */ - if (*base < minval) + if (*base < minval || !dest[0]) { minval = *base; for (n = 0; n < rank; n++) @@ -241,7 +241,7 @@ mminloc0_8_i8 (gfc_array_i8 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_INTEGER_8 minval; @@ -253,7 +253,7 @@ mminloc0_8_i8 (gfc_array_i8 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base < minval) + if (*mbase && (*base < minval || !dest[0])) { minval = *base; for (n = 0; n < rank; n++) |