Passing different kind integers

Passing different kind integers

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.   [A]
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

AttachmentSize
Download test-integer.f90639 bytes
4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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.

Steve - Intel Developer Support

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.

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.

Steve - Intel Developer Support

Leave a Comment

Please sign in to add a comment. Not a member? Join today