public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/32454] New: Bounds-check misses overflow of lhs array
@ 2007-06-21 12:26 burnus at gcc dot gnu dot org
2007-06-21 12:34 ` [Bug fortran/32454] " burnus at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-06-21 12:26 UTC (permalink / raw)
To: gcc-bugs
Should give with -fbounds-check something like the following (NAG f95 -C=all):
Rank 1 of array operand has extent 8 instead of 4
Program terminated by fatal error
In BOUNDSERROR, line 7 of test.f90
I think it might a duplicate of some PR, though I couldn't find it.
program boundsError
implicit none
integer :: i
integer, dimension(:), allocatable :: y
allocate(y(4))
y = 0.0
print *, size(y)
y = [y, (99,i=1,4)]
print *, size(y)
end program boundsError
--
Summary: Bounds-check misses overflow of lhs array
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
OtherBugsDependingO 27766
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32454
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/32454] Bounds-check misses overflow of lhs array
2007-06-21 12:26 [Bug fortran/32454] New: Bounds-check misses overflow of lhs array burnus at gcc dot gnu dot org
@ 2007-06-21 12:34 ` burnus at gcc dot gnu dot org
2007-07-03 10:25 ` fxcoudert at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-06-21 12:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from burnus at gcc dot gnu dot org 2007-06-21 12:33 -------
I forgot to mention: I think this file is valid Fortran 2003 and only invalid
Fortran 95. Maybe using:
integer, dimension(4) :: y
is a better test case.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32454
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/32454] Bounds-check misses overflow of lhs array
2007-06-21 12:26 [Bug fortran/32454] New: Bounds-check misses overflow of lhs array burnus at gcc dot gnu dot org
2007-06-21 12:34 ` [Bug fortran/32454] " burnus at gcc dot gnu dot org
@ 2007-07-03 10:25 ` fxcoudert at gcc dot gnu dot org
2010-07-01 15:01 ` dominiq at lps dot ens dot fr
2010-07-01 15:16 ` burnus at gcc dot gnu dot org
3 siblings, 0 replies; 6+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-07-03 10:25 UTC (permalink / raw)
To: gcc-bugs
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |accepts-invalid
Last reconfirmed|0000-00-00 00:00:00 |2007-07-03 10:25:41
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32454
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/32454] Bounds-check misses overflow of lhs array
2007-06-21 12:26 [Bug fortran/32454] New: Bounds-check misses overflow of lhs array burnus at gcc dot gnu dot org
2007-06-21 12:34 ` [Bug fortran/32454] " burnus at gcc dot gnu dot org
2007-07-03 10:25 ` fxcoudert at gcc dot gnu dot org
@ 2010-07-01 15:01 ` dominiq at lps dot ens dot fr
2010-07-01 15:16 ` burnus at gcc dot gnu dot org
3 siblings, 0 replies; 6+ messages in thread
From: dominiq at lps dot ens dot fr @ 2010-07-01 15:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from dominiq at lps dot ens dot fr 2010-07-01 15:01 -------
> I forgot to mention: I think this file is valid Fortran 2003 and only invalid
> Fortran 95. Maybe using:
> integer, dimension(4) :: y
> is a better test case.
It is caught at compile time:
y = [y, (99,i=1,4)]
1
Error: Different shape for array assignment at (1) on dimension 1 (4 and 8)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32454
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/32454] Bounds-check misses overflow of lhs array
2007-06-21 12:26 [Bug fortran/32454] New: Bounds-check misses overflow of lhs array burnus at gcc dot gnu dot org
` (2 preceding siblings ...)
2010-07-01 15:01 ` dominiq at lps dot ens dot fr
@ 2010-07-01 15:16 ` burnus at gcc dot gnu dot org
3 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-07-01 15:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from burnus at gcc dot gnu dot org 2010-07-01 15:16 -------
(In reply to comment #2)
> > Fortran 95. Maybe using:
> > integer, dimension(4) :: y
> > is a better test case.
>
> It is caught at compile time:
> y = [y, (99,i=1,4)]
> 1
> Error: Different shape for array assignment at (1) on dimension 1 (4 and 8)
Not if you write it as:
n = 4
y = [y, (99,i=1,n)]
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32454
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <bug-32454-4@http.gcc.gnu.org/bugzilla/>]
end of thread, other threads:[~2010-12-29 15:23 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-21 12:26 [Bug fortran/32454] New: Bounds-check misses overflow of lhs array burnus at gcc dot gnu dot org
2007-06-21 12:34 ` [Bug fortran/32454] " burnus at gcc dot gnu dot org
2007-07-03 10:25 ` fxcoudert at gcc dot gnu dot org
2010-07-01 15:01 ` dominiq at lps dot ens dot fr
2010-07-01 15:16 ` burnus at gcc dot gnu dot org
[not found] <bug-32454-4@http.gcc.gnu.org/bugzilla/>
2010-12-29 15:23 ` dfranke 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).