This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/37319] [4.4 regression] gfortran.dg/function_kinds_5.f90 fails



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]