[Patch, fortran] PR28735 - Crash in resolve.c - related to contents of .mod

Paul Thomas paulthomas2@wanadoo.fr
Fri Aug 18 07:13:00 GMT 2006


:ADDPATCH fortran:

This patch fixes a problem, in which the dummies of a public function 
that are private in one module but made public in another, caused a seg 
fault because resolve_variable went of to resolve references before 
checking that there was a symtree entry.  The reporter proposed a patch 
that added an extra check for the symtree but nothing is lost by 
inverting the order of the original check and the the reference 
resolution.  The testcase is a straightforward reduction of the original 
in the PR.

Regtested on SUSE10.1/amd64 - OK for trunk and 4.1?

Paul

2006-08-18  Paul Thomas  <pault@gcc.gnu.org>

    PR fortran/28735
    * resolve.c (resolve_variable): Check for a symtree before
    resolving references.

2006-08-18  Paul Thomas  <pault@gcc.gnu.org>

    PR fortran/28735
    * gfortran.dg/module_private_array_refs_1.f90: New test.

 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr28735.diff
Type: text/x-patch
Size: 2287 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20060818/f1d6bc87/attachment.bin>


More information about the Gcc-patches mailing list