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

%val type mismatch

scrognoid
Beginner
533 Views
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 "%")
0 Kudos
1 Solution
Steven_L_Intel1
Employee
533 Views
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.

View solution in original post

0 Kudos
1 Reply
Steven_L_Intel1
Employee
534 Views
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.
0 Kudos
Reply