(j3.2006) Problem with IEEE_Arithmetic
Malcolm Cohen
malcolm
Mon Aug 4 20:47:18 EDT 2014
The linker is part of "the processor". So this sounds like a bug. Have you
tried complaining to the relevant compiler vendors?
(I am unaware of any problem with the NAG compiler accepting this kind of
thing.)
Furthermore,
(a) intrinsic modules are not "program units", intrinsic module names are
***local identifiers*** not global identifiers;
(b) module procedures (which is presumably where you are seeing the name clash)
are not global entities either.
No change would seem to be needed to the standard.
Cheers,
-----Original Message-----
From: Van Snyder
Date: ?? 26?8?5? 9:36
To: j3
Subject: (j3.2006) Problem with IEEE_Arithmetic
I am trying to bring code from two groups together.
One of them has its own IEEE_Arithmetic module.
The other one has "use, intrinsic :: IEEE_Arithmetic".
When I try to link, at least with the compilers I use, it appears that
the hand-written IEEE_Arithmetic module and the intrinsic one have the
same mangled name.
11.2.2p3 says that if the module nature is not specified, and both a
nonintrinsic module and an intrinsic module with the same name exist,
the nonintrinsic module is accessed. So when I bring the two sets of
code together, I access both modules.
16.2p1 says that module names are global identifiers, and 16.2p2 says
that global identifiers have to be unique.
These two paragraphs conspire to cause the problem I'm having trying to
bring code from two groups together.
Processors need to know the difference between intrinsic and
nonintrinsic modules to make USE association work. Would it be an
insurmountable burden for them to arrange that the linker knows the
difference too?
Can we add an exception to 16.2p1 that allows two global identifiers to
be the same, if one is the identifier of an intrinsic module and the
other is the identifier of a nonintrinsic module?
If so, should we do it as an interp, or a work item?
_______________________________________________
J3 mailing list
J3 at mailman.j3-fortran.org
http://mailman.j3-fortran.org/mailman/listinfo/j3
________________________________________________________________________
This e-mail has been scanned for all viruses by Star.
________________________________________________________________________
--
................................Malcolm Cohen, Nihon NAG, Tokyo.
More information about the J3
mailing list