public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "arnaud02 at users dot sourceforge.net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/54767] New: Incorrect code generated with "-O2 -fcheck=bounds"
Date: Mon, 01 Oct 2012 15:08:00 -0000	[thread overview]
Message-ID: <bug-54767-4@http.gcc.gnu.org/bugzilla/> (raw)


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54767

             Bug #: 54767
           Summary: Incorrect code generated with "-O2 -fcheck=bounds"
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: arnaud02@users.sourceforge.net


Using the code attached:

>gfortran --version | head -2
GNU Fortran (GCC) 4.7.1
Copyright (C) 2012 Free Software Foundation, Inc.
>gfortran -O0 -fcheck=bounds xxx_1.f xxx_2.f
>/a.out
           2           1
           3           2
 T
>gfortran -O2 -fcheck=bounds xxx_1.f xxx_2.f
>./a.out
           2           1
           3           1
 F

The results are different and incorrect when compiling with "-O2
-fcheck=bounds". They are still correct when compiling with "-O1
-fcheck=bounds".


             reply	other threads:[~2012-10-01 15:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-01 15:08 arnaud02 at users dot sourceforge.net [this message]
2012-10-01 15:09 ` [Bug fortran/54767] " arnaud02 at users dot sourceforge.net
2012-10-01 17:45 ` [Bug fortran/54767] [4.7/4.8 Regression] " dominiq at lps dot ens.fr
2012-10-01 18:01 ` burnus at gcc dot gnu.org
2012-10-01 18:02 ` burnus at gcc dot gnu.org
2012-10-01 18:22 ` janus at gcc dot gnu.org
2012-11-07 13:32 ` jakub at gcc dot gnu.org
2013-01-14 21:01 ` mikael at gcc dot gnu.org
2013-01-14 21:46 ` hjl.tools at gmail dot com
2013-01-15 10:48 ` jakub at gcc dot gnu.org
2013-01-15 10:50 ` [Bug tree-optimization/54767] " rguenth at gcc dot gnu.org
2013-01-15 11:29 ` rguenth at gcc dot gnu.org
2013-01-15 11:36 ` rguenth at gcc dot gnu.org
2013-01-16 13:58 ` rguenth at gcc dot gnu.org
2013-01-16 15:23 ` [Bug tree-optimization/54767] [4.7 " rguenth at gcc dot gnu.org
2013-02-05 12:54 ` rguenth at gcc dot gnu.org
2013-02-05 12:55 ` rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-54767-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).