Re: variable content lost



Listad wrote:
Hi,
What version?
Target: powerpc-apple-darwin8
Configured with: ../gcc/configure --prefix=/usr/local/gfortran --
enable-languages=c,fortran --with-gmp=/tmp/gfortran-20070325/
gfortran_libs --enable-bootstrap --target=powerpc-apple-darwin8 --
host=powerpc-apple-darwin8 --build=powerpc-apple-darwin8 --disable-
multilib
Thread model: posix
gcc version 4.3.0 20070325 (experimental)

I downloaded this version with an installer, did not compile it
myself.

Try adding -Wall -pedantic to your commandline.
Done. No problems except some 'non-standard tabs'.

I uploaded the whole module, so that you can get a more complete
picture. I commented those functions that are in external modules.
http://listad.ifastnet.com/fortran/conductivity.f90

If I am indeed messing around with unallocated memory, then I cannot
find where. outside this module the values are all correct (main
program).

Lahey http://www.lahey.com/check.htm
thanks for the online checker, very useful. It also only complains
about non-conform tabstops (why is that?)


gdb (which you should have since you're using gcc) might let you set a watchpoint at the affected variable, fib%r(id,1), before you call segment_distance. gdb should stop when that spot in memory is changed.

Louis
.



Relevant Pages

  • Can you compile and run this benchmark on your 3.9 system?
    ... gcc 4.0 ?) ... So I'm asking readers if you would please try to compile and run this ... GNU gdb 6.3 ... Sun Enterprise 3500 Solaris 5.7 ...
    (comp.unix.bsd.openbsd.misc)
  • Re: How to debug gcc in Linux
    ... > I'm using gcc in Linux to compile my program. ... the -g flag produces debug informations on the binary, ... After the compilition open the binary with gdb. ...
    (comp.unix.programmer)
  • Re: Something new for FUSE
    ... Try to compile and link with -Zomf, also enable debug info with -g. ... If you don't have an IBM debugger there is ... I'm about to try and make fuse with gcc 3.3.5 and see what happens ... An alternative would be using gdb. ...
    (comp.os.os2.programmer.porting)
  • Re: gdb cant read symbol table (Dwarf Error)
    ... You must be using gnu gdb and Hp gcc on a PA-RISC machine. ... your program with the -gdwarf-2 switch? ... > Even for a trivial C program which I compile with gcc -g, ...
    (comp.sys.hp.hpux)
  • Re: How do I install this missing library?
    ... you really should be carefully following LSTC's installation ... libg2c is part of gcc. ... to tell a newcomer to compile. ... like the source code to GNU tar, and make sure you understand what's ...
    (comp.os.linux.misc)