View Full Version : allocatable arrays

06-24-2008, 04:15 PM
I am using gfortran f90. I was wondering can anyone else see allocatable arrays?. They seem to show up as a structure

06-25-2008, 07:31 AM
The problem with allocatable arrays in gfortran (and g95, iirc) is long-standing. The basic problem is that hte debug information produced by the compiler is somewhat immature. You're seeing what is basically an intermediate step towards producing the information we expect. The data in the struct you see should be translated into DWARF (the debug interface spec) and then we would be able to translate the data directly, as you see with other F90 compilers. I know one of the the Labs has been working with Red Hat to improve things, and allocatable arrays was on the list, but I don't know if they've addressed this specific issue. If you have a Red Hat subscription, you can check


Which is a beta version of the compiler. That should be released in RH 5.2, but I don't know that the changes have made their way back into the GNU community yet. Or if this specific issue was addressed.

In the meantime, you can dive on the data pointer, and then change the type to agree with the array type and size. For instance, I have a array of 10 int*8 that has just been allocated.

ALLOCATE (ifp(10))

If I dive on ifp after the allocate, and then dive on DATA, I see the corect data for the first element. Change the void type to integer*8 (10) (or $integer_8(10)) and you should see your data.

I hope that helps.


06-25-2008, 10:56 AM
Great that works good enough for me :)