diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2008-11-25 08:39:39 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2008-11-25 08:39:39 +0000 |
commit | abb370e4618c535561f2b8e942aaeb41114fdfd0 (patch) | |
tree | a19789201bdfcf229d1661d07bcf04da3f8b7ad0 /gcc | |
parent | ca4300857f06252b8968e856034a1f43f0f8b72e (diff) | |
download | gcc-abb370e4618c535561f2b8e942aaeb41114fdfd0.zip gcc-abb370e4618c535561f2b8e942aaeb41114fdfd0.tar.gz gcc-abb370e4618c535561f2b8e942aaeb41114fdfd0.tar.bz2 |
re PR fortran/37319 (gfortran.dg/function_kinds_5.f90 fails)
PR fortran/37319
* parse.c (match_deferred_characteristics): Make sure 'name' is
initialized before reading it.
From-SVN: r142188
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/parse.c | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index a698031..22f2817 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -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 diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index 954a22f..7eb0027 100644 --- a/gcc/fortran/parse.c +++ b/gcc/fortran/parse.c @@ -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 (); |