Bug 29677 - minimally informative gfortran -fbounds-check
Summary: minimally informative gfortran -fbounds-check
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.1.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
: 29678 (view as bug list)
Depends on:
Blocks: Fortran_bounds_checking
  Show dependency treegraph
 
Reported: 2006-10-31 21:25 UTC by Mike Keehan
Modified: 2006-11-16 07:51 UTC (History)
1 user (show)

See Also:
Host: SLES 9 opteron
Target: x86_64-unknown-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Keehan 2006-10-31 21:25:33 UTC
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? 

gfortran 4.1.1
Comment 1 kargl 2006-10-31 21:38:43 UTC
Upgrade to the a 4.2 pre-release version of gfortran or
the mainline version.  Please report back if you find
a problem.
Comment 2 Andrew Pinski 2006-10-31 21:41:14 UTC
The other thing is with debugging option such as -fbounds-check, you can also use gdb to figure out which one.
Comment 3 Andrew Pinski 2006-10-31 21:48:17 UTC
*** Bug 29678 has been marked as a duplicate of this bug. ***
Comment 4 tobias.burnus 2006-11-01 14:01:32 UTC
This has been fixed in the meanwhile.
(Don't forget, gfortran is not that old.)

Possibilities:
- 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 ./yourExecutable
(gdb) b _exit
Function "_exit" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (_exit) pending.
(gdb) run
[...]
(gdb) bt
Comment 5 Francois-Xavier Coudert 2006-11-16 07:51:31 UTC
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.