missaligned arrays

missaligned arrays

Paul C.'s picture

I have an older code which I wish to compile that contains missaligned arrays.

Outside a call to a subroutine:  Y(3,6)

In the subroutine call statement: G(3,6,8)

Previous versions of Intel Fortran would permit this to pass, but since I upgraded to VF 2010  and just now converted the project, I receive error messages.  What flags can be set to permit this to pass as before?  Any suggestions?  I do not wish to go through the code and fix these issues.

Current command line options are:

/nologo /debug:full /Od /pad_source /f66 /warn:interfaces /module:"Debug\\" /object:"Debug\\" /Fd"Debug\vc100.pdb" /traceback /check:bounds /libs:static /threads /dbglibs /c

Thank you

6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Tim Prince's picture

It looks like warn:interfaces is the one which is blocking acceptance of the non-conformant code.

Steve Lionel (Intel)'s picture

This is not "misaligned arrays". I am unclear as to what your code looks like and you haven't shown us the error message. I agree with Tim that it is likely generated interface checking is catching something not caught before, but I don't think you have explained the code well. Please show us some actual code for both the call and how it is declared in the subroutine (including declarations of all arguments on both sides.) Also show us the complete and exact text of the error message(s).

Steve
mecej4's picture

Paul C.: Since you already know that your code has argument array rank mismatches, but works(-ed) correctly, turning off the warn:interfaces option is probably the thing to try.

Steve Lionel (Intel)'s picture

If you pass Y(1,1), then it's ok for the ranks to mismatch.

The option mecej4 mentions is Fortran > Diagnostics > Check Routine Interfaces. But turning this off exposes you to other coding errors that will go undetected.

Steve
Paul C.'s picture

Folks,

The "warn: interfaces" apparently was the culprit.  I know it exposes other issues, but this is legacy code.  I appreciate your help. I thought it was something simple, but sometimes you don't see what's in front of you.

Thank you all again,

Paul

Login to leave a comment.