dummy alias cause result wrong.

dummy alias cause result wrong.

I have an old program which can get correct result in CVF+VS6. Now I have to make the program work correct in the IFC+VS2010, but i cannot make it.Please help me.

Through the program, there are a lot of codes which employ a non-standard usage. it applied a large array, distribute the first 100 to var x, the next 100 to y and so on.

in some subroutine, its dummy arguments only contain x, but in the subroutine code, it use x(101) to get the value of y.

I turn the dummy alias on and in the release mode, in most case, the result is right. But in some compute-comsume and memory-consume case, the result is wrong.

Because the program is full of this usage, it makes no sense to rewrite the code to the standard usage. Here is my opinion.

In the CVF, everything is right. so i think it may be some optimization option that cause the error in the IFC. can i turn off some specific option to get the right result? or Do you have any better idea?

Thank you very much!

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

/assume:dummy_alias should take care of this. I would be surprised by this working sometimes and not others - if it were simply an optimization, I would expect it to always work or always fail, unless you were using threading.  (Are you?)

Steve - Intel Developer Support

Optimization and dummy_ailas are one issue.

An additional issue could be you moved X and Y from COMMON and Y no longer abuts up to X

Proper syntax would be to use EQUIVALENCE to enforce X(101) and Y(1) are equivalent(you might want to dimension X(200). There are some restrictions on the use of what can be equivalenced.

Jim Dempsey


Leave a Comment

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