My boss teared my hair off with heavy sarcasm when we turned on -fbound-check.
The runtime executable proudly reported an array reference out of bounds.
My boss screamed "Which bloody one?!"
While I am very happy to know we have an array reference out of bounds
I can see his point. Could the error message say which array is out of bounds?
Upgrade to the a 4.2 pre-release version of gfortran or
the mainline version. Please report back if you find
The other thing is with debugging option such as -fbounds-check, you can also use gdb to figure out which one.
*** Bug 29678 has been marked as a duplicate of this bug. ***
This has been fixed in the meanwhile.
(Don't forget, gfortran is not that old.)
- Use a GCC 4.1 branch build (newer than 4.1.1)
- Use a GCC 4.2 branch build
- Use a GCC 4.3 trunk build
For openSUSE 10.x and SLED/SLES exist such packages (made by SUSE), for SL/SLES/SLED 9.x unfortunally not.
I would suggest to download a gfortran 4.2 or gfortran 4.3 build, both available e.g. at http://www.physik.fu-berlin.de/~tburnus/gcc-trunk/
You probably need also lib64-gmp4.2.1-mpfr2.2.0.tar.gz
* * *
Alternatively, run the program in gdb:
(gdb) b _exit
Function "_exit" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (_exit) pending.
Closing, since this was already fixed. Please reopen (or open a new report) if you have another example of such behaviour with an up-to-date compiler.