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

Subroutine as actual argument changes linker name

Christian
Novice
480 Views

Hello,

I use the compiler flag /iface:CVF.

A subroutine sub1 gets a parameter i declared as INTEGER*4:

SUBROUTINE sub1 (i)

INTEGER*4 i

The compiler generates the "linker name" _SUB1@4

Asubroutine "sub2"gets a parameter "func" declared as EXTERNAL:

SUBROUTINE sub2 (func)

EXTERNAL func

And now the compiler generates the "linker name" _SUB2 (without @4).

But when I call this function

EXTERNAL func_example

CALL sub2 (func_example)

The compiler generates _SUB2@4 - so there is a linker error.

This behaviouris newto 9.1.025 Release (it is not in IVF 9.0 and 9.1 beta)

I solved the problem with

!DEC$ ATTRIBUTES ALIAS:'_SUB2@4' :: sub2

Is there another way? Or is it a bug?

Thanks,

Christian Hinkamp

0 Kudos
1 Reply
Steven_L_Intel1
Employee
480 Views
It's a bug. Please report it.
0 Kudos
Reply