%val type mismatch

%val type mismatch

I have an array of addresses and I need to assign values to the variable at those address. In my previous compiler, I was able to pass the address using %val, and receive the address as a plain ol' variable of the correct type. FORTRAN passes by reference, so passing a reference by value gave me access to the variable. Intel FORTRAN complains of a type mismatch, insisting that %val yields an integer. I am passing a real address as an actual argument to a real variable dummy argument. How can I do this with Intel FORTRAN?

(I tried searching this forum, but search engines don't return results for "%")

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Best Reply

You can still do it that way, but you're running into the enhanced interface checking that Intel Fortran has. The easiest thing would be to disable the diagnostics for interfaces and disable generated interfaces.

There are ways to do this with the C interoperability features of F2003 but it's more work than I think is warranted here.

Retired 12/31/2016

Leave a Comment

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