re PR fortran/36313 ([F03] {MIN,MAX}{LOC,VAL} should accept character arguments)
authorThomas Koenig <tkoenig@gcc.gnu.org>
Thu, 23 Nov 2017 17:52:05 +0000 (17:52 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Thu, 23 Nov 2017 17:52:05 +0000 (17:52 +0000)
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.

From-SVN: r255109

15 files changed:
libgfortran/ChangeLog
libgfortran/generated/maxloc2_16_s1.c
libgfortran/generated/maxloc2_16_s4.c
libgfortran/generated/maxloc2_4_s1.c
libgfortran/generated/maxloc2_4_s4.c
libgfortran/generated/maxloc2_8_s1.c
libgfortran/generated/maxloc2_8_s4.c
libgfortran/generated/minloc2_16_s1.c
libgfortran/generated/minloc2_16_s4.c
libgfortran/generated/minloc2_4_s1.c
libgfortran/generated/minloc2_4_s4.c
libgfortran/generated/minloc2_8_s1.c
libgfortran/generated/minloc2_8_s4.c
libgfortran/m4/maxloc2s.m4
libgfortran/m4/minloc2s.m4

index 7715cb3e8f2283e9ed3592f691ef96469c6ed674..b69ad715dbbea589369093fdeeee80d1b883e7c4 100644 (file)
@@ -1,3 +1,22 @@
+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.
index 7770101e0f7569d611e7c9cfe79cf85ec10e5296..6b7eeb82fb090fdb5118faf7cfa9586b8bedb6b4 100644 (file)
@@ -30,7 +30,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #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);
@@ -38,7 +38,8 @@ compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, int 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
index 327979000fc2eaf028082e2b39b5892b9e4d155a..650abf9afeabeedb72816751152b542559ec776f 100644 (file)
@@ -30,7 +30,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #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);
@@ -38,7 +38,8 @@ compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, int 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
index a969fcbac93820ed2d40e6ba42a5cd18d654aee2..bcd89c504e1e9da649c8d5d48c7695ee45873575 100644 (file)
@@ -30,7 +30,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #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);
@@ -38,7 +38,8 @@ compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, int 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
index 3e9c089e2811604b64f76aec872962b4ac77551f..e4765c89fdc976854c7403ec076642ebabe30f93 100644 (file)
@@ -30,7 +30,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #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);
@@ -38,7 +38,8 @@ compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, int 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
index bb84ff40461d1307680c4ad8a47600c5940f305e..7ee1f6a081f65b8ad32d23544289ade5a0f4d776 100644 (file)
@@ -30,7 +30,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #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);
@@ -38,7 +38,8 @@ compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, int 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
index 1aa67ca391c60c313dc3803c7656e76662f01eb9..61ad61c00adca72cf3522de1189071e627920d2b 100644 (file)
@@ -30,7 +30,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #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);
@@ -38,7 +38,8 @@ compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, int 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
index 3f9e907f84db63c8b54a1bbea513b1b4db08f4b6..4c804e386d0aa674587ed4e9187fbae07dcd1f26 100644 (file)
@@ -30,7 +30,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #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);
@@ -38,7 +38,7 @@ compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, int 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
index 4857b08832c302bee4264f7bdc21fe65691dc143..103db0601c20916894ef60143a9cf4f9423eae1d 100644 (file)
@@ -30,7 +30,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #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);
@@ -38,7 +38,7 @@ compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, int 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
index 2fd526df0b863556e076c8cdc7e07c66c53e1fc3..fc2c1dd079ba53b7615ea2c5fe74aef4a010e9c8 100644 (file)
@@ -30,7 +30,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #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);
@@ -38,7 +38,7 @@ compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, int 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
index ad85d266fe2c1d589766cd53b85bb8db6b626b2b..b7b8876b1ca27561ef3c0f3822d94be90038bc09 100644 (file)
@@ -30,7 +30,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #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);
@@ -38,7 +38,7 @@ compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, int 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
index 0b594d6c6c61be729de6f8fb646441f3924564ee..dfcbde0eed649753d68d46dee3993dad00d2b0fc 100644 (file)
@@ -30,7 +30,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #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);
@@ -38,7 +38,7 @@ compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, int 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
index 71a55fcfba26eddb9575a8a9e01b681a449be17e..6a40731c5a8c40a9ac3aa8a32ba8678879160604 100644 (file)
@@ -30,7 +30,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #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);
@@ -38,7 +38,7 @@ compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, int 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
index 9b2ed740acafc7bbebb29ac925c60d9cd6e3e40b..8cfca6aab67dc7629eca3a725f70a5ba9101c6c2 100644 (file)
@@ -31,7 +31,7 @@ include(iparm.m4)dnl
 `#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);
@@ -39,7 +39,8 @@ compare_fcn (const 'atype_name` *a, const 'atype_name` *b, int 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`
index 38073ce75d51e20b9d2217eff88f66d724e4f6ed..8e99ed3cb5c6fd4167e49f69f9dcb47730c9c5ac 100644 (file)
@@ -31,7 +31,7 @@ include(iparm.m4)dnl
 `#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);
@@ -39,7 +39,7 @@ compare_fcn (const 'atype_name` *a, const 'atype_name` *b, int 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`