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

Sharing allocatable arrays using common

ferrad01
Beginner
1,039 Views

I'm sure this used to work, but it no longer worsk in v9.1. I am trying to share an allocatable array between subroutines using common (Modules are easy, but we cannot use them). Here is the bit of code.

program Console1

implicit none

real*8, pointer :: xPts(:)

common /iteration_r1/ xPts

allocate(xPts(502))

continue

end program Console1

If I put a break on the continue line, the variable watch on xPts says "Undefined pointer/array". Am I doing anything wrong?

Adrian

0 Kudos
5 Replies
Steven_L_Intel1
Employee
1,039 Views
That's a pointer array, not allocatable. The problem is that you can't view it in the debugger, right? The code actually works?

Have you tried 9.1.032? It includes some debugger fixes and I think may address this.
0 Kudos
ferrad01
Beginner
1,039 Views

Yes, pointer, sorry. I just installed 032 and I have the same problem. I can give the array elementsa value and printthem out, but debugging is impossible as it says Undefined pointer/array. How do I view these in the debugger?

Adrian

0 Kudos
Steven_L_Intel1
Employee
1,039 Views
Ah, ok. We have fixed this but the fix won't appear until the next update.

May I suggest using module variables rather than COMMON? It is the more modern approach.
0 Kudos
ferrad01
Beginner
1,039 Views

I wish I could, but we cannot use Modules in our project as yet. When could I get a copy of the fix?

Adrian

0 Kudos
Steven_L_Intel1
Employee
1,039 Views
When we next release an update to the compiler. I'm not sure when the nest one will be. It is a compiler bug.
0 Kudos
Reply