This is the mail archive of the gcc-patches@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]

[Patch, fortran] PR32103 - Module with equivalence draws "unsatisfied reference"


:ADDPATCH fortran:

This problem came about because module equivelance groups with one or
more unused members were cleared.  This being so, the remaining
members referenced variables in the module, rather than members of a
union representing the equivalence.  Even if that were not the case,
the missing, unused members carry offset information that is essential
to obtain the correct alignment.

The fix detects unused equivalence members, gives them a symtree with
a "unique name" that hides the symbol.  Whilst completely unused
equivalence groups are now cleared, the hidden symbols remain.  I was
unable to find a convenient, siple way of clearing the hidden symbols
and so decided to ignore them, since they get cleared up at the end of
compilation.

The testcase is an embellishment of the reporter's.

Regtested on x86_ia64/FC5 - OK for trunk?

Paul

2007-05-30 Paul Thomas <pault@gcc.gnu.org>

	PR fortran/32103
	* module.c (mio_symtree_ref): If an equivalence group member
	is not used, give it a hidden symbol and set the pointer_info.
	(load_equiv): Only free the equivalence if none of the members
	are used.

2007-05-30 Paul Thomas <pault@gcc.gnu.org>

	PR fortran/32103
	* gfortran.dg/module_equivalence_3.f90: New test.

Attachment: pr32103.diff
Description: Text document


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