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.

cDEC$ ALIAS

rre9518
Beginner
615 Views
I'm linking in a library which exported externals as uppercase, and I'm linking it into a application where I need lowercase.

Seems the ALIAS declaration is the best way toresolve this (right?) but when I give statement in the subroutine where I'm making the call:

cDEC$ ALIAS internalname,'INTERNALNAME'

the compiler hates it giving me a fatal error. CanALIAS handle case changes? Where is the proper place to place this statement (I put it right before the beginning of the instructions in the subroutine making the call).
0 Kudos
3 Replies
Steven_L_Intel1
Employee
615 Views

What is the error? Remember that the leading "c" should be "!" if this is free-form source.

Are you using /names:lower? I strongly recommend against that.

0 Kudos
Jugoslav_Dujic
Valued Contributor II
615 Views
Quoting - rre9518
Seems the ALIAS declaration is the best way toresolve this (right?) but when I give statement in the subroutine where I'm making the call:

cDEC$ ALIAS internalname,'INTERNALNAME'

the compiler hates it giving me a fatal error. CanALIAS handle case changes? Where is the proper place to place this statement (I put it right before the beginning of the instructions in the subroutine making the call).

For the start, this should use a colon rather than a comma, i.e.

cDEC$ ALIAS internalname: 'INTERNALNAME'

See, however, also this recent thread. It seems that you need a full INTERFACE block for the library routine available to the caller, to make the line above work.

(The compiler manual has always been a bit fuzzy on rules of placement and the scope of !DEC$ATTRIBUTES. Apparently, it likes it in some places but not in others, but I've never really paid attention to it, as I've always placed them either as first line of a SUBROUTINE statement, or within an INTERFACE block).


0 Kudos
Steven_L_Intel1
Employee
615 Views
Actually, comma is correct for the ALIAS directive, which predates ATTRIBUTES ALIAS. The latter uses a double-colon.
0 Kudos
Reply