[Pathch, fortran] PR35474 - [4.3/4.4 regression] Reading module file with COMMON and EQUIVALENCE

Paul Richard Thomas paul.richard.thomas@gmail.com
Sun Mar 9 12:12:00 GMT 2008


:ADDPATCH fortran:

This bug turned up in the compilation of hdf and so is rather urgent.
It appears around the time of my patch for PR32103.  Reverting that by
hand does not fix the problem, however:(  Anyway, it turns out to be
easily fixable, as the enclosed patch shows.

Since all the symbols in the module, in the testcase, are private,
there is no symtree for them, until the equivalence is built.  Thus,
the pointer to 'i', from the head of the common block is added to the
fixup list on the pointer_info structure for 'i'.  The moment that
this symbol is built, the fixups can be resolved and does not leave
them unrequited for the clean up phase.  The testcase is the
contributor's.

Regtested on amd64/Cygwin_NT - OK for trunk?

Paul

2008-03-09  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/35474
	* module.c (mio_symtree_ref): After providing a symbol for a
	missing euivalence member, resolve and NULL the fixups.

2008-03-09  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/35474
	* gfortran.dg/module_commons_2.f90

-- 
The knack of flying is learning how to throw yourself at the ground and miss.
       --Hitchhikers Guide to the Galaxy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: submit.diff
Type: text/x-patch
Size: 1387 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080309/6487e7ec/attachment.bin>


More information about the Fortran mailing list