public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "foreese at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/94978] New: [8/9/10/11 Regression] Bogus warning "Array reference at (1) out of bounds in loop beginning at (2)"
Date: Wed, 06 May 2020 23:22:02 +0000	[thread overview]
Message-ID: <bug-94978-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94978

            Bug ID: 94978
           Summary: [8/9/10/11 Regression] Bogus warning "Array reference
                    at (1) out of bounds in loop beginning at (2)"
           Product: gcc
           Version: 8.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: foreese at gcc dot gnu.org
  Target Milestone: ---

Created attachment 48472
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48472&action=edit
Testcase which exhibits the regression

The following issues a bogus warning which cannot be disabled except with -w.
The warning is not present in 7.x or earlier. Tried with 8.4.1, 9.3.1, 10 and
11.x (current trunk). Attached is a simple test case, which builds Pascal's
triangle of order 8 and exhibits the regression.

$ gfortran pascal.f03
pascal.f03:13:25:

   10 | do i = 0, 8
      |           2              
......
   13 |     pascal(i,j) = pascal(i-1,j) + pascal(i-1,j-1)
      |                         1
Warning: Array reference at (1) out of bounds (-1 < 0) in loop beginning at (2)
pascal.f03:13:41:

   10 | do i = 0, 8
      |           2                              
......
   13 |     pascal(i,j) = pascal(i-1,j) + pascal(i-1,j-1)
      |                                         1
Warning: Array reference at (1) out of bounds (-1 < 0) in loop beginning at (2)

             reply	other threads:[~2020-05-06 23:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-06 23:22 foreese at gcc dot gnu.org [this message]
2020-05-06 23:26 ` [Bug fortran/94978] " foreese at gcc dot gnu.org
2020-05-07  7:28 ` rguenth at gcc dot gnu.org
2020-05-18  8:56 ` tkoenig at gcc dot gnu.org
2020-07-26  7:58 ` tkoenig at gcc dot gnu.org
2020-11-02 20:11 ` anlauf at gcc dot gnu.org
2021-01-14  8:42 ` rguenth at gcc dot gnu.org
2021-04-16 16:22 ` tkoenig at gcc dot gnu.org
2021-05-14  9:53 ` [Bug fortran/94978] [9/10/11/12 " jakub at gcc dot gnu.org
2021-06-01  8:17 ` rguenth at gcc dot gnu.org
2022-05-27  9:42 ` [Bug fortran/94978] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:40 ` jakub at gcc dot gnu.org
2023-07-07 10:37 ` [Bug fortran/94978] [11/12/13/14 " 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-94978-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).