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

Passing different kind integers

Roman1
New Contributor I
461 Views

Hi,

When I compile the attached program, the following messages are displayed:

warning #6075: The data type of the actual argument does not match the definition.  
warning #5448: In the call to SUB1, actual argument #1 does not match the type and kind of the corresponding dummy argument.

Does anyone know why this is just a warning and not an error?  I made a similar test where I passed real variables that had a different kind, and there was an error as expected.

Roman

0 Kudos
3 Replies
Steven_L_Intel1
Employee
461 Views

It's a warning because a lot of people do this deliberately and we support it as an extension. It can be safe in many cases for integer arguments on little-endian systems (such as X86), but it's not safe for reals.

0 Kudos
Roman1
New Contributor I
461 Views

Thanks for the reply.  I understand now that it can be safe in some cases.  Are you saying that this is an Intel extension to Fortran?  I did try compiling the code with /stand:f03 /warn:stderrors  and I got the same warnings as before.  There was no indication in the compiler output that this was an extension.

0 Kudos
Steven_L_Intel1
Employee
461 Views

It is an extension, yes, but not an extension to "numbered syntax rules and constraints" that get standards warnings.  Basically, we told you there's a problem, it's up to you to decide what to do about it.

0 Kudos
Reply