Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Compiler not erroring IFORT 9.0

laura_thill
Beginner
455 Views
I'm working with a mixed language (F90,C,C++,Ada) project, thus many !DEC$ ATTRIBUTES ALIAS : 'some_var_' :: SOME_VAR statements. Occasionally a file will get into the Linux port that still has the Windows-style name decoration in the ATTRIBUTES ALIAS statement. Usually, the linker will identify these for me with an "unresolved external symbol" error. Sometime in the process of upgrading ifort 9.0, this ceased to happen. I tracked down several problems this week to variables with incorrect alias decoration, but the linker wasn't giving an error. Help? We're running IFORT 9.0 20050624.
0 Kudos
6 Replies
Steven_L_Intel1
Employee
455 Views
I can't think of any compiler change that would affect this. What "Windows-style" decoration are you using? The output of a "nm -a" command on the object or library would tell you what global/external names are defined and referenced.
0 Kudos
laura_thill
Beginner
455 Views
The "Windows style" name decoration is both preceding and trailing underscores. !DEC$ ATTRIBUTES ALIAS : "_some_var_" :: SOME_VAR. The variables show up in the nm listing as _some_var_, as expected.
The Linux alias' show up correctly as well, !DEC$ ATTRIBUTES ALIAS : 'some_var_' :: SOME_VAR will show up in the nm listing as some_var_.
0 Kudos
Steven_L_Intel1
Employee
455 Views
Trailing underscore is a convention on some UNIX systems, not Windows. Could it be that you have the -assume underscore option set?

If you can provide an example that demonstrates the problem, I'd like to see it.
0 Kudos
laura_thill
Beginner
455 Views
The -assume underscore option is not set. The trailing underscore is necessary on Windows becuase it is present in the Ada and C++ code. Changing naming conventions in those code sections is absolutely not an option.

I will attempt to generate a releaseable sample today.
0 Kudos
Steven_L_Intel1
Employee
455 Views
That's fine - I assume that the Ada and C++ code was migrated to Windows from a UNIX system where that convention is used.
0 Kudos
laura_thill
Beginner
455 Views
Steve -
Attached is some sample code. It does some calcualtions in an Ada library, and print some stuff to the screen. There is an exported variable in the Ada library that prints it's value to the screen, both inside the Ada code and the Fortran code. The exported variable is aliased inside export.cmn.
0 Kudos
Reply