+2017-11-23 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/36313
+ * m4/maxloc2s.m4: Replace int for character length by
+ gfc_charlen_type.
+ * m4/minloc2s.m4: Likewise.
+ * generated./maxloc2_16_s1.c: Regenerated.
+ * generated./maxloc2_16_s4.c: Regenerated.
+ * generated./maxloc2_4_s1.c: Regenerated.
+ * generated./maxloc2_4_s4.c: Regenerated.
+ * generated./maxloc2_8_s1.c: Regenerated.
+ * generated./maxloc2_8_s4.c: Regenerated.
+ * generated./minloc2_16_s1.c: Regenerated.
+ * generated./minloc2_16_s4.c: Regenerated.
+ * generated./minloc2_4_s1.c: Regenerated.
+ * generated./minloc2_4_s4.c: Regenerated.
+ * generated./minloc2_8_s1.c: Regenerated.
+ * generated./minloc2_8_s4.c: Regenerated.
+
2017-11-22 Janne Blomqvist <jb@gcc.gnu.org>
* intrinsics/eoshift0.c (eoshift0): Make shift an index_type.
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_16)
static inline int
-compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, int n)
+compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n)
{
if (sizeof (GFC_INTEGER_1) == 1)
return memcmp (a, b, n);
return memcmp_char4 (a, b, n);
}
-extern GFC_INTEGER_16 maxloc2_16_s1 (gfc_array_s1 * const restrict, int);
+extern GFC_INTEGER_16 maxloc2_16_s1 (gfc_array_s1 * const restrict,
+ gfc_charlen_type);
export_proto(maxloc2_16_s1);
GFC_INTEGER_16
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_16)
static inline int
-compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, int n)
+compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n)
{
if (sizeof (GFC_INTEGER_4) == 1)
return memcmp (a, b, n);
return memcmp_char4 (a, b, n);
}
-extern GFC_INTEGER_16 maxloc2_16_s4 (gfc_array_s4 * const restrict, int);
+extern GFC_INTEGER_16 maxloc2_16_s4 (gfc_array_s4 * const restrict,
+ gfc_charlen_type);
export_proto(maxloc2_16_s4);
GFC_INTEGER_16
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_4)
static inline int
-compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, int n)
+compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n)
{
if (sizeof (GFC_INTEGER_1) == 1)
return memcmp (a, b, n);
return memcmp_char4 (a, b, n);
}
-extern GFC_INTEGER_4 maxloc2_4_s1 (gfc_array_s1 * const restrict, int);
+extern GFC_INTEGER_4 maxloc2_4_s1 (gfc_array_s1 * const restrict,
+ gfc_charlen_type);
export_proto(maxloc2_4_s1);
GFC_INTEGER_4
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_4)
static inline int
-compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, int n)
+compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n)
{
if (sizeof (GFC_INTEGER_4) == 1)
return memcmp (a, b, n);
return memcmp_char4 (a, b, n);
}
-extern GFC_INTEGER_4 maxloc2_4_s4 (gfc_array_s4 * const restrict, int);
+extern GFC_INTEGER_4 maxloc2_4_s4 (gfc_array_s4 * const restrict,
+ gfc_charlen_type);
export_proto(maxloc2_4_s4);
GFC_INTEGER_4
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_8)
static inline int
-compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, int n)
+compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n)
{
if (sizeof (GFC_INTEGER_1) == 1)
return memcmp (a, b, n);
return memcmp_char4 (a, b, n);
}
-extern GFC_INTEGER_8 maxloc2_8_s1 (gfc_array_s1 * const restrict, int);
+extern GFC_INTEGER_8 maxloc2_8_s1 (gfc_array_s1 * const restrict,
+ gfc_charlen_type);
export_proto(maxloc2_8_s1);
GFC_INTEGER_8
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_8)
static inline int
-compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, int n)
+compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n)
{
if (sizeof (GFC_INTEGER_4) == 1)
return memcmp (a, b, n);
return memcmp_char4 (a, b, n);
}
-extern GFC_INTEGER_8 maxloc2_8_s4 (gfc_array_s4 * const restrict, int);
+extern GFC_INTEGER_8 maxloc2_8_s4 (gfc_array_s4 * const restrict,
+ gfc_charlen_type);
export_proto(maxloc2_8_s4);
GFC_INTEGER_8
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_16)
static inline int
-compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, int n)
+compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n)
{
if (sizeof (GFC_INTEGER_1) == 1)
return memcmp (a, b, n);
return memcmp_char4 (a, b, n);
}
-extern GFC_INTEGER_16 minloc2_16_s1 (gfc_array_s1 * const restrict, int);
+extern GFC_INTEGER_16 minloc2_16_s1 (gfc_array_s1 * const restrict, gfc_charlen_type);
export_proto(minloc2_16_s1);
GFC_INTEGER_16
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_16)
static inline int
-compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, int n)
+compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n)
{
if (sizeof (GFC_INTEGER_4) == 1)
return memcmp (a, b, n);
return memcmp_char4 (a, b, n);
}
-extern GFC_INTEGER_16 minloc2_16_s4 (gfc_array_s4 * const restrict, int);
+extern GFC_INTEGER_16 minloc2_16_s4 (gfc_array_s4 * const restrict, gfc_charlen_type);
export_proto(minloc2_16_s4);
GFC_INTEGER_16
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_4)
static inline int
-compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, int n)
+compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n)
{
if (sizeof (GFC_INTEGER_1) == 1)
return memcmp (a, b, n);
return memcmp_char4 (a, b, n);
}
-extern GFC_INTEGER_4 minloc2_4_s1 (gfc_array_s1 * const restrict, int);
+extern GFC_INTEGER_4 minloc2_4_s1 (gfc_array_s1 * const restrict, gfc_charlen_type);
export_proto(minloc2_4_s1);
GFC_INTEGER_4
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_4)
static inline int
-compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, int n)
+compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n)
{
if (sizeof (GFC_INTEGER_4) == 1)
return memcmp (a, b, n);
return memcmp_char4 (a, b, n);
}
-extern GFC_INTEGER_4 minloc2_4_s4 (gfc_array_s4 * const restrict, int);
+extern GFC_INTEGER_4 minloc2_4_s4 (gfc_array_s4 * const restrict, gfc_charlen_type);
export_proto(minloc2_4_s4);
GFC_INTEGER_4
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_8)
static inline int
-compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, int n)
+compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n)
{
if (sizeof (GFC_INTEGER_1) == 1)
return memcmp (a, b, n);
return memcmp_char4 (a, b, n);
}
-extern GFC_INTEGER_8 minloc2_8_s1 (gfc_array_s1 * const restrict, int);
+extern GFC_INTEGER_8 minloc2_8_s1 (gfc_array_s1 * const restrict, gfc_charlen_type);
export_proto(minloc2_8_s1);
GFC_INTEGER_8
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_8)
static inline int
-compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, int n)
+compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n)
{
if (sizeof (GFC_INTEGER_4) == 1)
return memcmp (a, b, n);
return memcmp_char4 (a, b, n);
}
-extern GFC_INTEGER_8 minloc2_8_s4 (gfc_array_s4 * const restrict, int);
+extern GFC_INTEGER_8 minloc2_8_s4 (gfc_array_s4 * const restrict, gfc_charlen_type);
export_proto(minloc2_8_s4);
GFC_INTEGER_8
`#if defined (HAVE_'atype_name`) && defined (HAVE_'rtype_name`)
static inline int
-compare_fcn (const 'atype_name` *a, const 'atype_name` *b, int n)
+compare_fcn (const 'atype_name` *a, const 'atype_name` *b, gfc_charlen_type n)
{
if (sizeof ('atype_name`) == 1)
return memcmp (a, b, n);
return memcmp_char4 (a, b, n);
}
-extern 'rtype_name` 'name`'rtype_qual`_'atype_code` ('atype` * const restrict, int);
+extern 'rtype_name` 'name`'rtype_qual`_'atype_code` ('atype` * const restrict,
+ gfc_charlen_type);
export_proto('name`'rtype_qual`_'atype_code`);
'rtype_name`
`#if defined (HAVE_'atype_name`) && defined (HAVE_'rtype_name`)
static inline int
-compare_fcn (const 'atype_name` *a, const 'atype_name` *b, int n)
+compare_fcn (const 'atype_name` *a, const 'atype_name` *b, gfc_charlen_type n)
{
if (sizeof ('atype_name`) == 1)
return memcmp (a, b, n);
return memcmp_char4 (a, b, n);
}
-extern 'rtype_name` 'name`'rtype_qual`_'atype_code` ('atype` * const restrict, int);
+extern 'rtype_name` 'name`'rtype_qual`_'atype_code` ('atype` * const restrict, gfc_charlen_type);
export_proto('name`'rtype_qual`_'atype_code`);
'rtype_name`