This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix PR fortran/37319
- From: jvdelisle at verizon dot net
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Mon, 24 Nov 2008 22:18:57 -0600 (CST)
- Subject: Re: [PATCH] Fix PR fortran/37319
Eric Botcazou wrote:
there is one remaining regression in the Fortran testsuite on
FAIL: gfortran.dg/function_kinds_5.f90 -O (test for errors, line 8)
The expected error message is not issued by the compiler. Recompile
the latter at -O0 and the message is correctly issued.
The problem is that, during the compilation of the testcase, the
string 'name' in parse.c:match_deferred_characteristics is used
/* 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) ==
gfc_current_block ()->declared_at = gfc_current_locus;
gfc_match ("function% %n", name) doesn't touch 'name' so the outcome
string comparison is random.
Proposed fix attached, tested on SPARC/Solaris, OK for mainline?
Reg tested on x86-64-gnu-linux. OK. Thanks for patch.