From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21762 invoked by alias); 16 Mar 2013 21:37:14 -0000 Received: (qmail 19641 invoked by uid 48); 16 Mar 2013 21:36:55 -0000 From: "dominiq at lps dot ens.fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/56637] Bad result on max(1,shiftr(j,1)) Date: Sat, 16 Mar 2013 21:37:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dominiq at lps dot ens.fr X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2013-03/txt/msg01201.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56637 --- Comment #6 from Dominique d'Humieres 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?