public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/30802]  New: out of bounds error in allocatable array not picked up with -fbounds-check
@ 2007-02-15  0:28 glv at maths dot otago dot ac dot nz
  2007-02-15  0:53 ` [Bug fortran/30802] " fxcoudert at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: glv at maths dot otago dot ac dot nz @ 2007-02-15  0:28 UTC (permalink / raw)
  To: gcc-bugs

Hi All,

For the following code:
program test
real, allocatable :: pos(:,:)
allocate(pos(2,2))
pos = 0.0
print *,pos(5,:)
deallocate(pos)
end program test

when compiled with:
gfortran -fbounds-check test.f95 

the out of bounds array reference in the print command should be picked up, but
isn't.  

Also fails in the same way using g95.

Replacing pos(5,:) with pos(5,1) is picked up.

Thanks, Gareth


-- 
           Summary: out of bounds error in allocatable array not picked up
                    with -fbounds-check
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: glv at maths dot otago dot ac dot nz
 GCC build triplet: x86_64-redhat-linux
  GCC host triplet: x86_64-redhat-linux
GCC target triplet: x86_64-redhat-linux


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


^ permalink raw reply	[flat|nested] 15+ messages in thread
[parent not found: <bug-30802-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2024-03-21 17:56 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-15  0:28 [Bug fortran/30802] New: out of bounds error in allocatable array not picked up with -fbounds-check glv at maths dot otago dot ac dot nz
2007-02-15  0:53 ` [Bug fortran/30802] " fxcoudert at gcc dot gnu dot org
2007-03-07  7:23 ` burnus at gcc dot gnu dot org
2007-05-09  7:09 ` fxcoudert at gcc dot gnu dot org
2007-08-06 21:13 ` fxcoudert at gcc dot gnu dot org
2007-12-08 18:07 ` [Bug fortran/30802] out of bounds error array I/O " fxcoudert at gcc dot gnu dot org
2007-12-17 22:23 ` tkoenig at gcc dot gnu dot org
2010-04-18 15:31 ` jvdelisle at gcc dot gnu dot org
     [not found] <bug-30802-4@http.gcc.gnu.org/bugzilla/>
2020-10-28 20:27 ` anlauf at gcc dot gnu.org
2023-09-14 19:44 ` anlauf at gcc dot gnu.org
2023-09-14 20:23 ` anlauf at gcc dot gnu.org
2023-09-15 17:14 ` cvs-commit at gcc dot gnu.org
2023-09-15 18:21 ` anlauf at gcc dot gnu.org
2023-09-15 19:06 ` anlauf at gcc dot gnu.org
2024-03-21 17:56 ` cvs-commit 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).