This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/37319] [4.4 regression] gfortran.dg/function_kinds_5.f90 fails
- From: "ebotcazou at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Nov 2008 19:59:51 -0000
- Subject: [Bug fortran/37319] [4.4 regression] gfortran.dg/function_kinds_5.f90 fails
- References: <bug-37319-12313@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from ebotcazou at gcc dot gnu dot org 2008-11-24 19:59 -------
> This looks like a missing or wrong initialisation.
Confirmed, it's 'name' in match_deferred_characteristics:
char name[GFC_MAX_SYMBOL_LEN + 1];
[...]
/* 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)
{
gfc_current_block ()->declared_at = gfc_current_locus;
gfc_commit_symbols ();
}
else
gfc_error_check ();
gfc_match ("function% %n", name) doesn't touch 'name' so the outcome of the
string comparison is random. Would it make sense to test the return value
of gfc_match here?
--
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pault at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37319