]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgfortran/generated/maxloc0_4_i1.c
re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=)
[thirdparty/gcc.git] / libgfortran / generated / maxloc0_4_i1.c
index 137e852d8609f8092169cc32b9494e7b550ab872..dc31e1d4b6584a7b5712a69fbdff06e90f3ac75f 100644 (file)
@@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 <http://www.gnu.org/licenses/>.  */
 
 #include "libgfortran.h"
+#include <assert.h>
 
 
 #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_4)
 
 
 extern void maxloc0_4_i1 (gfc_array_i4 * const restrict retarray, 
-       gfc_array_i1 * const restrict array);
+       gfc_array_i1 * const restrict array, GFC_LOGICAL_4);
 export_proto(maxloc0_4_i1);
 
 void
 maxloc0_4_i1 (gfc_array_i4 * const restrict retarray, 
-       gfc_array_i1 * const restrict array)
+       gfc_array_i1 * const restrict array, GFC_LOGICAL_4 back)
 {
   index_type count[GFC_MAX_DIMENSIONS];
   index_type extent[GFC_MAX_DIMENSIONS];
@@ -46,6 +47,7 @@ maxloc0_4_i1 (gfc_array_i4 * const restrict retarray,
   index_type rank;
   index_type n;
 
+  assert(back == 0);
   rank = GFC_DESCRIPTOR_RANK (array);
   if (rank <= 0)
     runtime_error ("Rank of array needs to be > 0");
@@ -167,13 +169,14 @@ maxloc0_4_i1 (gfc_array_i4 * const restrict retarray,
 
 
 extern void mmaxloc0_4_i1 (gfc_array_i4 * const restrict, 
-       gfc_array_i1 * const restrict, gfc_array_l1 * const restrict);
+       gfc_array_i1 * const restrict, gfc_array_l1 * const restrict,
+       GFC_LOGICAL_4);
 export_proto(mmaxloc0_4_i1);
 
 void
 mmaxloc0_4_i1 (gfc_array_i4 * const restrict retarray, 
        gfc_array_i1 * const restrict array,
-       gfc_array_l1 * const restrict mask)
+       gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back)
 {
   index_type count[GFC_MAX_DIMENSIONS];
   index_type extent[GFC_MAX_DIMENSIONS];
@@ -187,6 +190,7 @@ mmaxloc0_4_i1 (gfc_array_i4 * const restrict retarray,
   index_type n;
   int mask_kind;
 
+  assert(back == 0);
   rank = GFC_DESCRIPTOR_RANK (array);
   if (rank <= 0)
     runtime_error ("Rank of array needs to be > 0");
@@ -335,13 +339,13 @@ mmaxloc0_4_i1 (gfc_array_i4 * const restrict retarray,
 
 
 extern void smaxloc0_4_i1 (gfc_array_i4 * const restrict, 
-       gfc_array_i1 * const restrict, GFC_LOGICAL_4 *);
+       gfc_array_i1 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4);
 export_proto(smaxloc0_4_i1);
 
 void
 smaxloc0_4_i1 (gfc_array_i4 * const restrict retarray, 
        gfc_array_i1 * const restrict array,
-       GFC_LOGICAL_4 * mask)
+       GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back)
 {
   index_type rank;
   index_type dstride;
@@ -350,7 +354,7 @@ smaxloc0_4_i1 (gfc_array_i4 * const restrict retarray,
 
   if (*mask)
     {
-      maxloc0_4_i1 (retarray, array);
+      maxloc0_4_i1 (retarray, array, back);
       return;
     }