public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/94978] New: [8/9/10/11 Regression] Bogus warning "Array reference at (1) out of bounds in loop beginning at (2)"
@ 2020-05-06 23:22 foreese at gcc dot gnu.org
  2020-05-06 23:26 ` [Bug fortran/94978] " foreese at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: foreese at gcc dot gnu.org @ 2020-05-06 23:22 UTC (permalink / raw)
  To: gcc-bugs

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)

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-07-07 10:37 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-06 23:22 [Bug fortran/94978] New: [8/9/10/11 Regression] Bogus warning "Array reference at (1) out of bounds in loop beginning at (2)" foreese at gcc dot gnu.org
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

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).