[Patch, fortran] PR37274 - [Regression] error: type name is ambiguous and PR36374 - nested module inclusion fails

Paul Richard Thomas paul.richard.thomas@gmail.com
Thu Sep 4 08:36:00 GMT 2008


Salvatore,

Thanks for these two reports.  It turned out that the problems are
sufficiently related that your surmise that they are the same is
justified.

In both cases, read_module is detecting ambiguity incorrectly:
(i) In PR37274 it is the type of a function argument that is not made
public in the containing module that appears to be ambiguous with the
same derived type form its original module; and
(ii) In PR36374 it is generic interface procedures from different
modules that are incorrectly identified to be ambiguous.

The solution is not to depend merely on the symbols being different
for ambiguity but to check, in addition, for these two cases.  Since
there might be other, similar problems lurking in the background, I
have introduced a static function to do the test.

This patch has yet to be regtested but deals correctly with the other
module tests in the testsuite.

After regtesting, OK for trunk and 4.3?

Paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Change.Logs
Type: application/octet-stream
Size: 398 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080904/59e44e9f/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: submit.diff
Type: text/x-patch
Size: 10243 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080904/59e44e9f/attachment.bin>


More information about the Fortran mailing list