This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch, Fortran, RFC] Implement library side of {MIN,MAX}{LOC,VAL} with character arguments


Hello world,

this patch implements the library side of PR 36313, minloc and friends
on character arguments.

I haven't started tackling the inline versions yet.  I suspect that
these are easy for somebody who knows the scalarizer (not me :-) but
I'll start looking into how to do it.  Unless, of course, somebody
else wants to do it *HINT*

Any comments?  I was not planning on committing yet, because for the
more simple cases we actually hit an ICE with this patch instead of
a clean error message.

Regards

Thomas

2011-09-19 Thomas Koenig <tkoenig@gcc.gnu.org>

        PR fortran/36313
        * m4/foreach.m4 (slen_proto): New macro, for adding ',int ' in
        prototypes.  Use it throughout the file.
        (slen_def): New macro, for adding ', int slen' in function
        argument lists.  Use it throughout the file.
        (slen_use): New macro for optionally putting slen into an argument
        list.  Use it throughout the file.
        * m4/iparm.m4: Use 's' as letter for character functions.
        * m4/ifunction.m4 (slen_proto): New macro, for adding ',int ' in
        prototypes.  Use it throughout the file.
        (slen_def): New macro, for adding ', int slen' in function
        argument lists.  Use it throughout the file.
        (slen_use): New macro for optionally putting slen into an argument
        list.  Use it throughout the file.
        * gfortran.map: Add _gfortran_maxloc0_1_s1,
        _gfortran_maxloc0_2_s1, _gfortran_maxloc0_4_s1,
        _gfortran_maxloc0_8_s1, _gfortran_maxloc0_16_s1,
        _gfortran_maxloc0_1_s4, _gfortran_maxloc0_2_s4,
        _gfortran_maxloc0_4_s4, _gfortran_maxloc0_8_s4,
        _gfortran_maxloc0_16_s4, _gfortran_minloc0_1_s1,
        _gfortran_minloc0_2_s1, _gfortran_minloc0_4_s1,
        _gfortran_minloc0_8_s1, _gfortran_minloc0_16_s1,
        _gfortran_minloc0_1_s4, _gfortran_minloc0_2_s4,
        _gfortran_minloc0_4_s4, _gfortran_minloc0_8_s4,
        _gfortran_minloc0_16_s4, _gfortran_maxloc1_1_s1,
        _gfortran_maxloc1_2_s1, _gfortran_maxloc1_4_s1,
        _gfortran_maxloc1_8_s1, _gfortran_maxloc1_16_s1,
        _gfortran_maxloc1_1_s4, _gfortran_maxloc1_2_s4,
        _gfortran_maxloc1_4_s4, _gfortran_maxloc1_8_s4,
        _gfortran_maxloc1_16_s4, _gfortran_minloc1_1_s1,
        _gfortran_minloc1_2_s1, _gfortran_minloc1_4_s1,
        _gfortran_minloc1_8_s1, _gfortran_minloc1_16_s1,
        _gfortran_minloc1_1_s4, _gfortran_minloc1_2_s4,
        _gfortran_minloc1_4_s4, _gfortran_minloc1_8_s4,
        _gfortran_minloc1_16_s4, _gfortran_maxval_s1,
        _gfortran_maxval_s4, _gfortran_minval_s1,
        _gfortran_minval_s4.
        * libgfortran.h (gfc_array_s1):  Add type definition.
        (gfc_array_s4):  Add type definition.
        * Makefile.am (i_maxloc0s_c):  Add; also add dependencies.
        (i_maxloc1s_c):  Likewise.
        (i_maxvals_c):  Likewise.
        (i_minloc0s_c):  Likewise.
        (i_minloc1s_c):  Likewise.
        (i_minvals_c):  Likewise.
        * mk-kinds-h.sh:  Also emit HAVE_GFC_UINTEGER_* macros.
        * m4/ifunction-s.m4:  New file.
        * m4/maxloc0s.m4:  New file.
        * m4/maxloc1s.m4:  New file.
        * m4/maxvals.m4:  New file.
        * m4/minloc0s.m4:  New file.
        * m4/minloc1s.m4:  New file.
        * m4/minvals.m4:  New file.

2011-09-19 Thomas Koenig <tkoenig@gcc.gnu.org>

        PR fortran/36313
        * frontend-passes.c (optimize_minmaxloc):  Don't optimize
        minloc/maxloc if the first argument is of type character.
        * check.c (int_or_real_or_char_check_2003):  New function.
        (gfc_check_minloc_maxloc):  Use it, instead of
        int_or_real_check.
        (gfc_check_minval_maxval):  Likewise.
Index: frontend-passes.c
===================================================================
--- frontend-passes.c	(Revision 178930)
+++ frontend-passes.c	(Arbeitskopie)
@@ -971,6 +971,12 @@ optimize_minmaxloc (gfc_expr **e)
       || fn->value.function.actual->expr->rank != 1)
     return;
 
+  /* FIXME: At the moment, we cannot handle inlined MAXLOC for characer.
+     Remove this when it is handled later.  */
+
+  if (fn->value.function.actual->expr->ts.type == BT_CHARACTER)
+    return;
+
   *e = gfc_get_array_expr (fn->ts.type, fn->ts.kind, &fn->where);
   (*e)->shape = fn->shape;
   fn->rank = 0;
Index: check.c
===================================================================
--- check.c	(Revision 178930)
+++ check.c	(Arbeitskopie)
@@ -111,7 +111,38 @@ int_or_real_check (gfc_expr *e, int n)
   return SUCCESS;
 }
 
+/* If we are at <= f95, check for integer or real; allow character
+   for f2003 or higher.  */
+static gfc_try
+int_or_real_or_char_check_2003 (gfc_expr *e, int n)
+{
+  if (e->ts.type != BT_INTEGER && e->ts.type != BT_REAL)
+    {
+      if (e->ts.type == BT_CHARACTER)
+	return gfc_notify_std (GFC_STD_F2003, "Fortran 2003:  CHARACTER  for "
+			       "'%s' argument of '%s' intrinsic at %L",
+			       gfc_current_intrinsic_arg[n]->name,
+			       gfc_current_intrinsic, &e->where);
+      else
+	{
+	  char *allowed;
+	  char irc[] = "INTEGER, REAL or CHARACTER";
+	  char ir[] = "INTEGER or REAL";
 
+	  if (gfc_option.allow_std & GFC_STD_F2003)
+	    allowed = irc;
+	  else
+	    allowed = ir;
+	  
+	  gfc_error ("'%s' argument of '%s' intrinsic at %L must be %s",
+		     gfc_current_intrinsic_arg[n]->name,
+		     gfc_current_intrinsic, &e->where, allowed);
+	  return FAILURE;
+	}
+    }
+  return SUCCESS;
+}
+
 /* Check that an expression is real or complex.  */
 
 static gfc_try
@@ -2442,7 +2473,8 @@ gfc_check_minloc_maxloc (gfc_actual_arglist *ap)
   gfc_expr *a, *m, *d;
 
   a = ap->expr;
-  if (int_or_real_check (a, 0) == FAILURE || array_check (a, 0) == FAILURE)
+  if (int_or_real_or_char_check_2003 (a, 0) == FAILURE
+      || array_check (a, 0) == FAILURE)
     return FAILURE;
 
   d = ap->next->expr;
@@ -2535,7 +2567,7 @@ check_reduction (gfc_actual_arglist *ap)
 gfc_try
 gfc_check_minval_maxval (gfc_actual_arglist *ap)
 {
-  if (int_or_real_check (ap->expr, 0) == FAILURE
+  if (int_or_real_or_char_check_2003 (ap->expr, 0) == FAILURE
       || array_check (ap->expr, 0) == FAILURE)
     return FAILURE;
 
Index: libgfortran/m4/iforeach.m4
===================================================================
--- libgfortran/m4/iforeach.m4	(Revision 178930)
+++ libgfortran/m4/iforeach.m4	(Arbeitskopie)
@@ -2,15 +2,18 @@ dnl Support macro file for intrinsic functions.
 dnl Contains the generic sections of the array functions.
 dnl This file is part of the GNU Fortran 95 Runtime Library (libgfortran)
 dnl Distributed under the GNU GPL with exception.  See COPYING for details.
+define(`slen_proto',`ifelse(atype_letter,s,`, int')')dnl
+define(`slen_def',`ifelse(atype_letter,s,`, int slen')')dnl
+define(`slen_use',`ifelse(atype_letter,s,`, slen')')dnl
 define(START_FOREACH_FUNCTION,
 `
 extern void name`'rtype_qual`_'atype_code (rtype * const restrict retarray, 
-	atype * const restrict array);
+	atype * const restrict array`'slen_proto`');
 export_proto(name`'rtype_qual`_'atype_code);
 
 void
 name`'rtype_qual`_'atype_code (rtype * const restrict retarray, 
-	atype * const restrict array)
+	atype * const restrict array`'slen_def`')
 {
   index_type count[GFC_MAX_DIMENSIONS];
   index_type extent[GFC_MAX_DIMENSIONS];
@@ -104,13 +107,13 @@ define(FINISH_FOREACH_FUNCTION,
 define(START_MASKED_FOREACH_FUNCTION,
 `
 extern void `m'name`'rtype_qual`_'atype_code (rtype * const restrict, 
-	atype * const restrict, gfc_array_l1 * const restrict);
+	atype * const restrict, gfc_array_l1 * const restrict`'slen_proto`');
 export_proto(`m'name`'rtype_qual`_'atype_code);
 
 void
 `m'name`'rtype_qual`_'atype_code (rtype * const restrict retarray, 
 	atype * const restrict array,
-	gfc_array_l1 * const restrict mask)
+	gfc_array_l1 * const restrict mask`'slen_def`')
 {
   index_type count[GFC_MAX_DIMENSIONS];
   index_type extent[GFC_MAX_DIMENSIONS];
@@ -235,13 +238,13 @@ FINISH_MASKED_FOREACH_FUNCTION')dnl
 define(SCALAR_FOREACH_FUNCTION,
 `
 extern void `s'name`'rtype_qual`_'atype_code (rtype * const restrict, 
-	atype * const restrict, GFC_LOGICAL_4 *);
+	atype * const restrict, GFC_LOGICAL_4 *`'slen_proto`');
 export_proto(`s'name`'rtype_qual`_'atype_code);
 
 void
 `s'name`'rtype_qual`_'atype_code (rtype * const restrict retarray, 
 	atype * const restrict array,
-	GFC_LOGICAL_4 * mask)
+	GFC_LOGICAL_4 * mask`'slen_def`')
 {
   index_type rank;
   index_type dstride;
@@ -250,7 +253,7 @@ void
 
   if (*mask)
     {
-      name`'rtype_qual`_'atype_code (retarray, array);
+      name`'rtype_qual`_'atype_code (retarray, array`'slen_use`');
       return;
     }
 
Index: libgfortran/m4/iparm.m4
===================================================================
--- libgfortran/m4/iparm.m4	(Revision 178930)
+++ libgfortran/m4/iparm.m4	(Arbeitskopie)
@@ -4,7 +4,7 @@ dnl This file is part of the GNU Fortran 95 Runtim
 dnl Distributed under the GNU GPL with exception.  See COPYING for details.
 dnl M4 macro file to get type names from filenames
 define(get_typename2, `GFC_$1_$2')dnl
-define(get_typename, `get_typename2(ifelse($1,i,INTEGER,ifelse($1,r,REAL,ifelse($1,l,LOGICAL,ifelse($1,c,COMPLEX,unknown)))),`$2')')dnl
+define(get_typename, `get_typename2(ifelse($1,i,INTEGER,ifelse($1,r,REAL,ifelse($1,l,LOGICAL,ifelse($1,s,UINTEGER,ifelse($1,c,COMPLEX,unknown))))),`$2')')dnl
 define(get_arraytype, `gfc_array_$1$2')dnl
 define(define_type, `dnl
 ifelse(regexp($2,`^[0-9]'),-1,`dnl
Index: libgfortran/m4/ifunction.m4
===================================================================
--- libgfortran/m4/ifunction.m4	(Revision 178930)
+++ libgfortran/m4/ifunction.m4	(Arbeitskopie)
@@ -17,16 +17,19 @@ dnl atype_name and rtype_name respectively.
 dnl Execution should be allowed to continue to the end of the block.
 dnl You should not return or break from the inner loop of the implementation.
 dnl Care should also be taken to avoid using the names defined in iparm.m4
+define(`slen_proto',`ifelse(atype_letter,s,`, int')')dnl
+define(`slen_def',`ifelse(atype_letter,s,`, int slen')')dnl
+define(`slen_use',`ifelse(atype_letter,s,`, slen')')dnl
 define(START_ARRAY_FUNCTION,
 `
 extern void name`'rtype_qual`_'atype_code (rtype * const restrict, 
-	atype * const restrict, const index_type * const restrict);
+	atype * const restrict, const index_type * const restrict`'slen_proto`');
 export_proto(name`'rtype_qual`_'atype_code);
 
 void
 name`'rtype_qual`_'atype_code (rtype * const restrict retarray, 
 	atype * const restrict array, 
-	const index_type * const restrict pdim)
+	const index_type * const restrict pdim`'slen_def`')
 {
   index_type count[GFC_MAX_DIMENSIONS];
   index_type extent[GFC_MAX_DIMENSIONS];
@@ -177,14 +180,14 @@ define(START_MASKED_ARRAY_FUNCTION,
 `
 extern void `m'name`'rtype_qual`_'atype_code (rtype * const restrict, 
 	atype * const restrict, const index_type * const restrict,
-	gfc_array_l1 * const restrict);
+	gfc_array_l1 * const restrict`'slen_proto`');
 export_proto(`m'name`'rtype_qual`_'atype_code);
 
 void
 `m'name`'rtype_qual`_'atype_code (rtype * const restrict retarray, 
 	atype * const restrict array, 
 	const index_type * const restrict pdim, 
-	gfc_array_l1 * const restrict mask)
+	gfc_array_l1 * const restrict mask`'slen_def`')
 {
   index_type count[GFC_MAX_DIMENSIONS];
   index_type extent[GFC_MAX_DIMENSIONS];
@@ -360,14 +363,14 @@ define(SCALAR_ARRAY_FUNCTION,
 `
 extern void `s'name`'rtype_qual`_'atype_code (rtype * const restrict, 
 	atype * const restrict, const index_type * const restrict,
-	GFC_LOGICAL_4 *);
+	GFC_LOGICAL_4 *`'slen_def`');
 export_proto(`s'name`'rtype_qual`_'atype_code);
 
 void
 `s'name`'rtype_qual`_'atype_code (rtype * const restrict retarray, 
 	atype * const restrict array, 
 	const index_type * const restrict pdim, 
-	GFC_LOGICAL_4 * mask)
+	GFC_LOGICAL_4 * mask`'slen_def`')
 {
   index_type count[GFC_MAX_DIMENSIONS];
   index_type extent[GFC_MAX_DIMENSIONS];
@@ -380,7 +383,7 @@ void
 
   if (*mask)
     {
-      name`'rtype_qual`_'atype_code (retarray, array, pdim);
+      name`'rtype_qual`_'atype_code (retarray, array, pdim`'slen_use`');
       return;
     }
   /* Make dim zero based to avoid confusion.  */
Index: libgfortran/gfortran.map
===================================================================
--- libgfortran/gfortran.map	(Revision 178930)
+++ libgfortran/gfortran.map	(Arbeitskopie)
@@ -1187,6 +1187,50 @@ GFORTRAN_1.4 {
     _gfortran_cshift0_16_char4;
     _gfortran_eoshift0_16_char4;
     _gfortran_eoshift2_16_char4;
+    _gfortran_maxloc0_1_s1;
+    _gfortran_maxloc0_2_s1;
+    _gfortran_maxloc0_4_s1;
+    _gfortran_maxloc0_8_s1;
+    _gfortran_maxloc0_16_s1;
+    _gfortran_maxloc0_1_s4;
+    _gfortran_maxloc0_2_s4;
+    _gfortran_maxloc0_4_s4;
+    _gfortran_maxloc0_8_s4;
+    _gfortran_maxloc0_16_s4;
+    _gfortran_minloc0_1_s1;
+    _gfortran_minloc0_2_s1;
+    _gfortran_minloc0_4_s1;
+    _gfortran_minloc0_8_s1;
+    _gfortran_minloc0_16_s1;
+    _gfortran_minloc0_1_s4;
+    _gfortran_minloc0_2_s4;
+    _gfortran_minloc0_4_s4;
+    _gfortran_minloc0_8_s4;
+    _gfortran_minloc0_16_s4;
+    _gfortran_maxloc1_1_s1;
+    _gfortran_maxloc1_2_s1;
+    _gfortran_maxloc1_4_s1;
+    _gfortran_maxloc1_8_s1;
+    _gfortran_maxloc1_16_s1;
+    _gfortran_maxloc1_1_s4;
+    _gfortran_maxloc1_2_s4;
+    _gfortran_maxloc1_4_s4;
+    _gfortran_maxloc1_8_s4;
+    _gfortran_maxloc1_16_s4;
+    _gfortran_minloc1_1_s1;
+    _gfortran_minloc1_2_s1;
+    _gfortran_minloc1_4_s1;
+    _gfortran_minloc1_8_s1;
+    _gfortran_minloc1_16_s1;
+    _gfortran_minloc1_1_s4;
+    _gfortran_minloc1_2_s4;
+    _gfortran_minloc1_4_s4;
+    _gfortran_minloc1_8_s4;
+    _gfortran_minloc1_16_s4;
+    _gfortran_maxval_s1;
+    _gfortran_maxval_s4;
+    _gfortran_minval_s1;
+    _gfortran_minval_s4;
 } GFORTRAN_1.3; 
 
 F2C_1.0 {
Index: libgfortran/libgfortran.h
===================================================================
--- libgfortran/libgfortran.h	(Revision 178930)
+++ libgfortran/libgfortran.h	(Arbeitskopie)
@@ -339,6 +339,8 @@ struct {\
 /* Commonly used array descriptor types.  */
 typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, void) gfc_array_void;
 typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, char) gfc_array_char;
+typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_UINTEGER_1) gfc_array_s1;
+typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_UINTEGER_4) gfc_array_s4;
 typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_INTEGER_1) gfc_array_i1;
 typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_INTEGER_2) gfc_array_i2;
 typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_INTEGER_4) gfc_array_i4;
Index: libgfortran/Makefile.am
===================================================================
--- libgfortran/Makefile.am	(Revision 178930)
+++ libgfortran/Makefile.am	(Arbeitskopie)
@@ -248,6 +248,18 @@ $(srcdir)/generated/maxloc0_4_r16.c \
 $(srcdir)/generated/maxloc0_8_r16.c \
 $(srcdir)/generated/maxloc0_16_r16.c
 
+i_maxloc0s_c = \
+$(srcdir)/generated/maxloc0_1_s1.c \
+$(srcdir)/generated/maxloc0_1_s4.c \
+$(srcdir)/generated/maxloc0_2_s1.c \
+$(srcdir)/generated/maxloc0_2_s4.c \
+$(srcdir)/generated/maxloc0_4_s1.c \
+$(srcdir)/generated/maxloc0_4_s4.c \
+$(srcdir)/generated/maxloc0_8_s1.c \
+$(srcdir)/generated/maxloc0_8_s4.c \
+$(srcdir)/generated/maxloc0_16_s1.c \
+$(srcdir)/generated/maxloc0_16_s4.c
+
 i_maxloc1_c= \
 $(srcdir)/generated/maxloc1_4_i1.c \
 $(srcdir)/generated/maxloc1_8_i1.c \
@@ -277,6 +289,18 @@ $(srcdir)/generated/maxloc1_4_r16.c \
 $(srcdir)/generated/maxloc1_8_r16.c \
 $(srcdir)/generated/maxloc1_16_r16.c
 
+i_maxloc1s_c = \
+$(srcdir)/generated/maxloc1_1_s1.c \
+$(srcdir)/generated/maxloc1_1_s4.c \
+$(srcdir)/generated/maxloc1_2_s1.c \
+$(srcdir)/generated/maxloc1_2_s4.c \
+$(srcdir)/generated/maxloc1_4_s1.c \
+$(srcdir)/generated/maxloc1_4_s4.c \
+$(srcdir)/generated/maxloc1_8_s1.c \
+$(srcdir)/generated/maxloc1_8_s4.c \
+$(srcdir)/generated/maxloc1_16_s1.c \
+$(srcdir)/generated/maxloc1_16_s4.c
+
 i_maxval_c= \
 $(srcdir)/generated/maxval_i1.c \
 $(srcdir)/generated/maxval_i2.c \
@@ -288,6 +312,10 @@ $(srcdir)/generated/maxval_r8.c \
 $(srcdir)/generated/maxval_r10.c \
 $(srcdir)/generated/maxval_r16.c
 
+i_maxvals_c= \
+$(srcdir)/generated/maxval_s1.c \
+$(srcdir)/generated/maxval_s4.c
+
 i_minloc0_c= \
 $(srcdir)/generated/minloc0_4_i1.c \
 $(srcdir)/generated/minloc0_8_i1.c \
@@ -317,6 +345,18 @@ $(srcdir)/generated/minloc0_4_r16.c \
 $(srcdir)/generated/minloc0_8_r16.c \
 $(srcdir)/generated/minloc0_16_r16.c
 
+i_minloc0s_c = \
+$(srcdir)/generated/minloc0_1_s1.c \
+$(srcdir)/generated/minloc0_1_s4.c \
+$(srcdir)/generated/minloc0_2_s1.c \
+$(srcdir)/generated/minloc0_2_s4.c \
+$(srcdir)/generated/minloc0_4_s1.c \
+$(srcdir)/generated/minloc0_4_s4.c \
+$(srcdir)/generated/minloc0_8_s1.c \
+$(srcdir)/generated/minloc0_8_s4.c \
+$(srcdir)/generated/minloc0_16_s1.c \
+$(srcdir)/generated/minloc0_16_s4.c
+
 i_minloc1_c= \
 $(srcdir)/generated/minloc1_4_i1.c \
 $(srcdir)/generated/minloc1_8_i1.c \
@@ -346,6 +386,18 @@ $(srcdir)/generated/minloc1_4_r16.c \
 $(srcdir)/generated/minloc1_8_r16.c \
 $(srcdir)/generated/minloc1_16_r16.c
 
+i_minloc1s_c = \
+$(srcdir)/generated/minloc1_1_s1.c \
+$(srcdir)/generated/minloc1_1_s4.c \
+$(srcdir)/generated/minloc1_2_s1.c \
+$(srcdir)/generated/minloc1_2_s4.c \
+$(srcdir)/generated/minloc1_4_s1.c \
+$(srcdir)/generated/minloc1_4_s4.c \
+$(srcdir)/generated/minloc1_8_s1.c \
+$(srcdir)/generated/minloc1_8_s4.c \
+$(srcdir)/generated/minloc1_16_s1.c \
+$(srcdir)/generated/minloc1_16_s4.c
+
 i_minval_c= \
 $(srcdir)/generated/minval_i1.c \
 $(srcdir)/generated/minval_i2.c \
@@ -357,6 +409,10 @@ $(srcdir)/generated/minval_r8.c \
 $(srcdir)/generated/minval_r10.c \
 $(srcdir)/generated/minval_r16.c
 
+i_minvals_c= \
+$(srcdir)/generated/minval_s1.c \
+$(srcdir)/generated/minval_s4.c
+
 i_norm2_c= \
 $(srcdir)/generated/norm2_r4.c \
 $(srcdir)/generated/norm2_r8.c \
@@ -646,7 +702,8 @@ gfor_built_src= $(i_all_c) $(i_any_c) $(i_count_c)
     $(i_exponent_c) $(i_fraction_c) $(i_nearest_c) $(i_set_exponent_c) \
     $(i_pow_c) $(i_rrspacing_c) $(i_spacing_c) $(i_pack_c) $(i_unpack_c) \
     $(i_spread_c) selected_int_kind.inc selected_real_kind.inc kinds.h \
-    $(i_cshift0_c) kinds.inc c99_protos.inc fpu-target.h
+    $(i_cshift0_c) kinds.inc c99_protos.inc fpu-target.h $(i_maxloc0s_c) \
+    $(i_minloc0s_c) $(i_maxloc1s_c) $(i_minloc1s_c) $(i_maxvals_c) $(i_minvals_c)
 
 # Machine generated specifics
 gfor_built_specific_src= \
@@ -848,6 +905,7 @@ I_M4_DEPS=m4/iparm.m4
 I_M4_DEPS0=$(I_M4_DEPS) m4/iforeach.m4
 I_M4_DEPS1=$(I_M4_DEPS) m4/ifunction.m4
 I_M4_DEPS2=$(I_M4_DEPS) m4/ifunction_logical.m4
+I_M4_DEPS3=$(I_M4_DEPS) m4/ifunction-s.m4
 
 kinds.h: $(srcdir)/mk-kinds-h.sh
 	$(SHELL) $(srcdir)/mk-kinds-h.sh '$(FCCOMPILE)' > $@ || rm $@
@@ -895,21 +953,39 @@ $(i_iparity_c): m4/iparity.m4 $(I_M4_DEPS)
 $(i_maxloc0_c): m4/maxloc0.m4 $(I_M4_DEPS0)
 	$(M4) -Dfile=$@ -I$(srcdir)/m4 maxloc0.m4 > $@
 
+$(i_maxloc0s_c) : m4/maxloc0s.m4 $(I_M4_DEPS0)
+	$(M4) -Dfile=$@ -I$(srcdir)/m4 maxloc0s.m4 > $@
+
 $(i_maxloc1_c): m4/maxloc1.m4 $(I_M4_DEPS1)
 	$(M4) -Dfile=$@ -I$(srcdir)/m4 maxloc1.m4 > $@
 
+$(i_maxloc1s_c): m4/maxloc1s.m4 $(I_M4_DEPS1)
+	$(M4) -Dfile=$@ -I$(srcdir)/m4 maxloc1s.m4 > $@
+
 $(i_maxval_c): m4/maxval.m4 $(I_M4_DEPS1)
 	$(M4) -Dfile=$@ -I$(srcdir)/m4 maxval.m4 > $@
 
+$(i_maxvals_c): m4/maxvals.m4 $(I_M4_DEPS3)
+	$(M4) -Dfile=$@ -I$(srcdir)/m4 maxvals.m4 > $@
+
 $(i_minloc0_c): m4/minloc0.m4 $(I_M4_DEPS0)
 	$(M4) -Dfile=$@ -I$(srcdir)/m4 minloc0.m4 > $@
 
+$(i_minloc0s_c) : m4/minloc0s.m4 $(I_M4_DEPS0)
+	$(M4) -Dfile=$@ -I$(srcdir)/m4 minloc0s.m4 > $@
+
 $(i_minloc1_c): m4/minloc1.m4 $(I_M4_DEPS1)
 	$(M4) -Dfile=$@ -I$(srcdir)/m4 minloc1.m4 > $@
 
+$(i_minloc1s_c): m4/minloc1s.m4 $(I_M4_DEPS1)
+	$(M4) -Dfile=$@ -I$(srcdir)/m4 minloc1s.m4 > $@
+
 $(i_minval_c): m4/minval.m4 $(I_M4_DEPS1)
 	$(M4) -Dfile=$@ -I$(srcdir)/m4 minval.m4 > $@
 
+$(i_minvals_c): m4/minvals.m4 $(I_M4_DEPS3)
+	$(M4) -Dfile=$@ -I$(srcdir)/m4 minvals.m4 > $@
+
 $(i_product_c): m4/product.m4 $(I_M4_DEPS1)
 	$(M4) -Dfile=$@ -I$(srcdir)/m4 product.m4 > $@
 
Index: libgfortran/mk-kinds-h.sh
===================================================================
--- libgfortran/mk-kinds-h.sh	(Revision 178930)
+++ libgfortran/mk-kinds-h.sh	(Arbeitskopie)
@@ -34,6 +34,7 @@ for k in $possible_integer_kinds; do
     echo "typedef GFC_INTEGER_${k} GFC_LOGICAL_${k};"
     echo "#define HAVE_GFC_LOGICAL_${k}"
     echo "#define HAVE_GFC_INTEGER_${k}"
+    echo "#define HAVE_GFC_UINTEGER_${k}"
     echo ""
   fi
   rm -f tmp$$.*

Attachment: ifunction-s.m4
Description: Text document

Attachment: maxloc0s.m4
Description: Text document

Attachment: minloc1s.m4
Description: Text document

Attachment: minloc0s.m4
Description: Text document

Attachment: maxloc1s.m4
Description: Text document

Attachment: minvals.m4
Description: Text document

Attachment: maxvals.m4
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]