[PATCH, Fortran] fix EQUIVALENCE in MODULE issues
Steve Kargl
sgk@troutmask.apl.washington.edu
Wed Jun 3 22:05:00 GMT 2015
The attach patch fixes two issues with EQUIVALENCE statements
in modules.
The first issue was fixed by Russell Whitesides where an
EQUIVALENCE statement that is USEs associated into multiple
modules will appear multiple times in a new module if the
previous modules are USEd by the new module. Russell's
patch checks for duplicates and tosses extra instances.
His original patch is found here:
https://gcc.gnu.org/ml/fortran/2015-05/msg00073.html
A testcase is available in PR fortran/60780. That testcase
may be unsuitable for the testsuite.
The second issue involves nearly 9 year code (r113465), which
tries to eliminate unused equivalence-objects from an
equivalence-set if the user USEs an ONLY clause (see PR
fortran/66377). According to Dominique this issue goes back
to at least 4.3.1.
I have built trunk and regression tested the attached patch.
There are no regression caused by the patch. OK to commit?
PS: pault, the old code was written by you.
2015-06-03 Russell Whitesides <russelldub@gmail.com>
Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/40958
PR fortran/60780
PR fortran/66377
* module.c (load_equiv): Add check for loading duplicate EQUIVALENCEs
from different modules. Eliminate the pruning of unused
equivalence-objects
2015-06-03 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66377
gfortran.dg/equiv_9.f90: New test.
--
Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: equiv.diff
Type: text/x-diff
Size: 2023 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20150603/2142242e/attachment.bin>
More information about the Fortran
mailing list