Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussions

mac named common block imports dead code

Deleted_U_Intel
Employee
921 Views
I am trying out the mac 11.1 fortran compiler and have discovered that if a subroutine with a named common block is linked into the executable then a subroutine which is not in the execution tree (i.e. dead code) and also contains that named common block then it will also be linked in along with any dependent subroutines it contains. When I use the "-why_live" linker option I see something like this,

0x104595040 _tgrf3d_ from lib/trgraf.a(tgrf3d.o)
0x1044954b0 _grf3f1_ from lib/trgraf.a(grf3f1.o)
0x103d735b0 _plfryw_ from lib/rplot_sub.a(plfryw.o)
0x103d764f0 _trace@0 from lib/rplot_sub.a(plfryw.o)

PLFRYW should never have gotten linked in but it shares a named common block with something which was linked and if I remove that named common block, it doesn't get linked in. Whatever _trace@0 is, it seems to be resolving this dependence. I wonder if this is related to


Is there any way to control this behaviour perhaps by marking references as weak? Thanks.

0 Kudos
0 Replies
Reply