This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/56637] Bad result on max(1,shiftr(j,1))
- From: "dominiq at lps dot ens.fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 16 Mar 2013 21:36:54 +0000
- Subject: [Bug fortran/56637] Bad result on max(1,shiftr(j,1))
- Auto-submitted: auto-generated
- References: <bug-56637-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56637
--- Comment #6 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2013-03-16 21:36:54 UTC ---
> I don't mean to be argumentative, but I would like to ask:
> Would an index out of bounds explain why single stepping over the statement
> make it work, and would it explain that a higher level of optimization works?
Absolutely: all the errors mentioned by Thomas give behaviors sensitive to the
memory layout! However if you compile with -fcheck=bounds, out of bounds
error(s) should be detected. Did you check that you pass the right arguments
(position, type, kind, ...) to the procedures in the libraries you are using?