public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/28129] New: gfortran -fbounds-check: Shows invalid array out of bounds error
@ 2006-06-21 20:49 tobias dot burnus at physik dot fu-berlin dot de
2006-06-22 9:26 ` [Bug fortran/28129] " fxcoudert at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: tobias dot burnus at physik dot fu-berlin dot de @ 2006-06-21 20:49 UTC (permalink / raw)
To: gcc-bugs
(This PR should probably added as dependency to bug 27766)
This is with my GCC/gfortran build x86_64-2006-06-21-r114837.
If I run the following program, which I think is completely valid, with
gfortran -fbounds-check
I get:
Fortran runtime error: Array reference out of bounds, upper bound of
dimension 2 exceeded (in file 'gftest.f90', around line 2)
However, I think the program (see below) is completely valid and it also works
flawlessly with all checks turned on with NAG f95 and ifort. (And with gfortran
and no checks it does not crash.)
-------------------------------------
subroutine wavefmt(ld,wfmt)
implicit none
integer, intent(in) :: ld
complex(8), intent(out) :: wfmt(ld,*)
wfmt(:,1)=0.d0
end subroutine wavefmt
program test
implicit none
integer, parameter :: lmmaxvr = 64, nrcmtmax = 107
complex(8), allocatable :: wfmt1(:,:)
allocate(wfmt1(lmmaxvr,nrcmtmax))
call wavefmt(lmmaxvr,wfmt1)
end program test
-------------------------------------
--
Summary: gfortran -fbounds-check: Shows invalid array out of
bounds error
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tobias dot burnus at physik dot fu-berlin dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28129
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/28129] gfortran -fbounds-check: Shows invalid array out of bounds error
2006-06-21 20:49 [Bug fortran/28129] New: gfortran -fbounds-check: Shows invalid array out of bounds error tobias dot burnus at physik dot fu-berlin dot de
@ 2006-06-22 9:26 ` fxcoudert at gcc dot gnu dot org
2006-07-05 11:50 ` fxcoudert at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-06-22 9:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from fxcoudert at gcc dot gnu dot org 2006-06-22 06:33 -------
Confirmed, I'll look into it.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |27766
nThis| |
AssignedTo|unassigned at gcc dot gnu |fxcoudert at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-06-22 06:33:02
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28129
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/28129] gfortran -fbounds-check: Shows invalid array out of bounds error
2006-06-21 20:49 [Bug fortran/28129] New: gfortran -fbounds-check: Shows invalid array out of bounds error tobias dot burnus at physik dot fu-berlin dot de
2006-06-22 9:26 ` [Bug fortran/28129] " fxcoudert at gcc dot gnu dot org
@ 2006-07-05 11:50 ` fxcoudert at gcc dot gnu dot org
2006-07-06 20:37 ` fxcoudert at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-07-05 11:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from fxcoudert at gcc dot gnu dot org 2006-07-05 11:50 -------
I have a patch here: http://gcc.gnu.org/ml/gcc-patches/2006-07/msg00137.html
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://gcc.gnu.org/ml/gcc-
| |patches/2006-
| |07/msg00137.html
Keywords| |patch
Target Milestone|--- |4.1.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28129
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/28129] gfortran -fbounds-check: Shows invalid array out of bounds error
2006-06-21 20:49 [Bug fortran/28129] New: gfortran -fbounds-check: Shows invalid array out of bounds error tobias dot burnus at physik dot fu-berlin dot de
2006-06-22 9:26 ` [Bug fortran/28129] " fxcoudert at gcc dot gnu dot org
2006-07-05 11:50 ` fxcoudert at gcc dot gnu dot org
@ 2006-07-06 20:37 ` fxcoudert at gcc dot gnu dot org
2006-07-24 21:03 ` [Bug fortran/28129] [4.1 only] " fxcoudert at gcc dot gnu dot org
2006-07-24 21:04 ` [Bug fortran/28129] " fxcoudert at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-07-06 20:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from fxcoudert at gcc dot gnu dot org 2006-07-06 20:37 -------
Subject: Bug 28129
Author: fxcoudert
Date: Thu Jul 6 20:37:36 2006
New Revision: 115231
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115231
Log:
PR fortran/28129
* trans-array.c (gfc_trans_array_bound_check): Add a locus
argument, and use it in the error messages.
(gfc_conv_array_index_offset): Donc perform bounds checking on
the last dimension of assumed-size arrays.
* gfortran.dg/bounds_check_4.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/bounds_check_4.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-array.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28129
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/28129] [4.1 only] gfortran -fbounds-check: Shows invalid array out of bounds error
2006-06-21 20:49 [Bug fortran/28129] New: gfortran -fbounds-check: Shows invalid array out of bounds error tobias dot burnus at physik dot fu-berlin dot de
` (2 preceding siblings ...)
2006-07-06 20:37 ` fxcoudert at gcc dot gnu dot org
@ 2006-07-24 21:03 ` fxcoudert at gcc dot gnu dot org
2006-07-24 21:04 ` [Bug fortran/28129] " fxcoudert at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-07-24 21:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from fxcoudert at gcc dot gnu dot org 2006-07-24 21:02 -------
Subject: Bug 28129
Author: fxcoudert
Date: Mon Jul 24 21:02:39 2006
New Revision: 115722
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115722
Log:
PR fortran/28129
* trans-array.c (gfc_trans_array_bound_check): Add a locus
argument, and use it in the error messages.
(gfc_conv_array_index_offset): Donc perform bounds checking on
the last dimension of assumed-size arrays.
* gfortran.dg/bounds_check_4.f90: New test.
PR fortran/27874
* trans-stmt.c (compute_inner_temp_size): Don't perform bounds
checking when calculating the bounds of scalarization.
PR fortran/20892
* interface.c (gfc_match_interface): Don't allow dummy procedures
to have a generic interface.
Added:
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/bounds_check_4.f90
- copied unchanged from r115231,
trunk/gcc/testsuite/gfortran.dg/bounds_check_4.f90
Modified:
branches/gcc-4_1-branch/gcc/fortran/ChangeLog
branches/gcc-4_1-branch/gcc/fortran/interface.c
branches/gcc-4_1-branch/gcc/fortran/trans-array.c
branches/gcc-4_1-branch/gcc/fortran/trans-stmt.c
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28129
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/28129] gfortran -fbounds-check: Shows invalid array out of bounds error
2006-06-21 20:49 [Bug fortran/28129] New: gfortran -fbounds-check: Shows invalid array out of bounds error tobias dot burnus at physik dot fu-berlin dot de
` (3 preceding siblings ...)
2006-07-24 21:03 ` [Bug fortran/28129] [4.1 only] " fxcoudert at gcc dot gnu dot org
@ 2006-07-24 21:04 ` fxcoudert at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-07-24 21:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from fxcoudert at gcc dot gnu dot org 2006-07-24 21:04 -------
Fixed.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Known to fail|4.1.2 |
Known to work|4.2.0 |4.2.0 4.1.2
Resolution| |FIXED
Summary|[4.1 only] gfortran - |gfortran -fbounds-check:
|fbounds-check: Shows invalid|Shows invalid array out of
|array out of bounds error |bounds error
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28129
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-07-24 21:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-21 20:49 [Bug fortran/28129] New: gfortran -fbounds-check: Shows invalid array out of bounds error tobias dot burnus at physik dot fu-berlin dot de
2006-06-22 9:26 ` [Bug fortran/28129] " fxcoudert at gcc dot gnu dot org
2006-07-05 11:50 ` fxcoudert at gcc dot gnu dot org
2006-07-06 20:37 ` fxcoudert at gcc dot gnu dot org
2006-07-24 21:03 ` [Bug fortran/28129] [4.1 only] " fxcoudert at gcc dot gnu dot org
2006-07-24 21:04 ` [Bug fortran/28129] " fxcoudert at gcc dot gnu dot 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).