This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/28849] Missed array shape violation with RESHAPE despite -fbounds-check
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Nov 2006 20:08:39 -0000
- Subject: [Bug fortran/28849] Missed array shape violation with RESHAPE despite -fbounds-check
- References: <bug-28849-6318@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from burnus at gcc dot gnu dot org 2006-11-08 20:08 -------
Postscriptum:
sunf95 already finds the problem in the program "check" at compile time.
For non-intrinsics (non libgfortran) routines, one way to do it is too do it in
the function called. (Internally called as foo (&parm.5, D.1358);)
That way one could even detect the problem if one moves the "foo" function out
of the "program" and uses an "interface". In this case neither sunf95 nor
NAGf95 find the error.
But what would be the best way for the library? Adding a check version to it?
Adding a if(flag) to it (may slow down)? Both NAG f95 and sunf95 seem to expand
those intrinsics (pack, reshape, transpose) rather than using a library call
and add then the check directly in the tree.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28849