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

Buggy associate construct in 11.0

Andrew_Smith
Valued Contributor I
598 Views
I have started using the associate construct where I need to dig deep into an array of derived types. It is simpler than using a local pointer or creating a subroutine. But there are some problems with this construct in IVF 11.0.

Firstly the Visual studio debugger can no longer see any variables other than the associated name while inside the associate block.

Secondly, if you assign a value to a local variable while in the block, then this is seen as an unpure action.

Thirdly, the associated name cannot be used as the target for a pointer. Maybe this one is not required by the standard?

Can you tell me if these problems will be fixed?
0 Kudos
4 Replies
Steven_L_Intel1
Employee
598 Views
Would you please show a short sample that demonstrates the issues you raise?
0 Kudos
Andrew_Smith
Valued Contributor I
598 Views
Would you please show a short sample that demonstrates the issues you raise?

Thanks for asking Steve. Gave me something to do this evening. The attached code shows two subroutines. They accomplish the same thing but the first uses a pointer to simplify references whereas the second uses the associate construct.

The pointer routine compiles with no errors. The asscociate routine shows two errors for attempts to assign local variables and one error for attempting a pointer onto the associated name.

The debugging problem will show up once you get it to compile! To to this replace the inner code with the commented line.

The visibility of variables in the debugger in this case is opposite to what I said in my post. The name aThing is not visible, whereas the local variables are. My post related to some real code which I cannot post.

0 Kudos
Steven_L_Intel1
Employee
598 Views
Thanks! The compile error is not fixed in the initial 11.1 release - I will report this to the developers. (Issue IDDPD200136877) On the other hand, when I make the substitution so that it compiles, I can see aThing in the debugger just fine in 11.1.
0 Kudos
Steven_L_Intel1
Employee
598 Views
This problem is fixed in 11.1 Update 3, available now.
0 Kudos
Reply