Problem with GDB: "Cannot access memory at address 0x0"

Problem with GDB: "Cannot access memory at address 0x0"

Hi everybody,

I've got a problem with debugging any fortran program compiled by ifort. Let's suppose we have compiled the following program by ifort -g sample.f

!sample.f

integer ff, gg

dimension:: ff(100), gg(100)

character*3 a

ff=1

gg=2

a="YES"

end

!---------------------

Now if I debug the code using gdb, and try to get the values of local variables defined by program, I see the following outputs:

(gdb) info locals

a = '\001\000\000'

ff = Cannot access memory at address 0x0

As you can see, the debugger has not been able to return the value of "ff". I guess "Cannot access memory at address 0x0" means that the variable is NULL, but I have already defined the "ff" array in the program. I would be grateful if somebody could help me out to get rid of this message.

Thanks

P.S. My system is Mac (10.5.5) with ifort 10.1.017 andgdb 6.3.50

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