]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/37319 (gfortran.dg/function_kinds_5.f90 fails)
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 25 Nov 2008 08:39:39 +0000 (08:39 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 25 Nov 2008 08:39:39 +0000 (08:39 +0000)
PR fortran/37319
* parse.c (match_deferred_characteristics): Make sure 'name' is
initialized before reading it.

From-SVN: r142188

gcc/fortran/ChangeLog
gcc/fortran/parse.c

index a698031dce222d469de9ed3351f48530062e157e..22f2817943e727918eb122a242b0ff356a7805c9 100644 (file)
@@ -1,3 +1,9 @@
+2008-11-25  Eric Botcazou  <ebotcazou@adacore.com>
+
+       PR fortran/37319
+       * parse.c (match_deferred_characteristics): Make sure 'name' is
+       initialized before reading it.
+
 2008-11-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
        PR fortran/37803
index 954a22f092643f915108c4d93165f0990b4e1905..7eb002780533c777022883d0236604794711bad5 100644 (file)
@@ -2265,8 +2265,9 @@ match_deferred_characteristics (gfc_typespec * ts)
 
   /* Set the function locus correctly.  If we have not found the
      function name, there is an error.  */
-  gfc_match ("function% %n", name);
-  if (m == MATCH_YES && strcmp (name, gfc_current_block ()->name) == 0)
+  if (m == MATCH_YES
+      && gfc_match ("function% %n", name) == MATCH_YES
+      && strcmp (name, gfc_current_block ()->name) == 0)
     {
       gfc_current_block ()->declared_at = gfc_current_locus;
       gfc_commit_symbols ();