https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87851

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anlauf at gcc dot gnu.org

--- Comment #8 from anlauf at gcc dot gnu.org ---
The following obvious patch seems to fix the issue and regtests cleanly
after adjustment of one testcase:

Index: gcc/fortran/iresolve.c
===================================================================
--- gcc/fortran/iresolve.c      (Revision 277298)
+++ gcc/fortran/iresolve.c      (Arbeitskopie)
@@ -1536,7 +1536,7 @@
   if (kind)
     f->ts.kind = mpz_get_si (kind->value.integer);
   else
-    f->ts.kind = gfc_default_integer_kind;
+    f->ts.kind = gfc_charlen_int_kind;
   f->value.function.name = gfc_get_string ("__len_trim%d", string->ts.kind);
 }

Index: gcc/testsuite/gfortran.dg/initialization_18.f90
===================================================================
--- gcc/testsuite/gfortran.dg/initialization_18.f90     (Revision 277298)
+++ gcc/testsuite/gfortran.dg/initialization_18.f90     (Arbeitskopie)
@@ -1,5 +1,5 @@
 ! { dg-do compile }
-! { dg-options "-std=f95 -Wall" }
+! { dg-options "-std=f95 -Wall -Wno-conversion" }
 !
 ! PR fortran/34915
 ! Testcase contributed by Al Greynolds via comp.lang.fortran.

Reply via email to