public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/19777] -fbounds-check catches non-existent bounds violation
[not found] <20050203104947.19777.sfilippone@uniroma2.it>
@ 2005-02-07 4:25 ` pinskia at gcc dot gnu dot org
2005-04-11 23:50 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-07 4:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-06 18:38 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |wrong-code
Last reconfirmed|0000-00-00 00:00:00 |2005-02-06 18:38:47
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19777
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/19777] -fbounds-check catches non-existent bounds violation
[not found] <20050203104947.19777.sfilippone@uniroma2.it>
2005-02-07 4:25 ` [Bug fortran/19777] -fbounds-check catches non-existent bounds violation pinskia at gcc dot gnu dot org
@ 2005-04-11 23:50 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-11 23:50 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-11 23:50 -------
D.491 = D.487 <= 0;
D.492 = D.487 > 0;
D.493 = D.491 || D.492;
D.494 = __builtin_expect (D.493, 0);
That is just wrong.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Last reconfirmed|2005-02-06 18:38:47 |2005-04-11 23:50:45
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19777
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/19777] -fbounds-check catches non-existent bounds violation
[not found] <bug-19777-9410@http.gcc.gnu.org/bugzilla/>
` (12 preceding siblings ...)
2006-05-27 9:41 ` fxcoudert at gcc dot gnu dot org
@ 2006-06-03 16:08 ` fxcoudert at gcc dot gnu dot org
13 siblings, 0 replies; 16+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-06-03 16:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #19 from fxcoudert at gcc dot gnu dot org 2006-06-03 16:08 -------
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] -fbounds-check |-fbounds-check catches non-
|catches non-existent bounds |existent bounds violation
|violation |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19777
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/19777] -fbounds-check catches non-existent bounds violation
[not found] <bug-19777-9410@http.gcc.gnu.org/bugzilla/>
` (11 preceding siblings ...)
2006-05-27 8:31 ` fxcoudert at gcc dot gnu dot org
@ 2006-05-27 9:41 ` fxcoudert at gcc dot gnu dot org
2006-06-03 16:08 ` fxcoudert at gcc dot gnu dot org
13 siblings, 0 replies; 16+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-05-27 9:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #16 from fxcoudert at gcc dot gnu dot org 2006-05-27 09:41 -------
Subject: Bug 19777
Author: fxcoudert
Date: Sat May 27 09:41:42 2006
New Revision: 114153
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114153
Log:
PR fortran/19777
* trans-array.c (gfc_conv_array_ref): Don't perform out-of-bounds
checking for assumed-size arrrays.
* gfortran.dg/bounds_check_2.f: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/bounds_check_2.f
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-array.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19777
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/19777] -fbounds-check catches non-existent bounds violation
[not found] <bug-19777-9410@http.gcc.gnu.org/bugzilla/>
` (10 preceding siblings ...)
2006-05-24 22:00 ` fxcoudert at gcc dot gnu dot org
@ 2006-05-27 8:31 ` fxcoudert at gcc dot gnu dot org
2006-05-27 9:41 ` fxcoudert at gcc dot gnu dot org
2006-06-03 16:08 ` fxcoudert at gcc dot gnu dot org
13 siblings, 0 replies; 16+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-05-27 8:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from fxcoudert at gcc dot gnu dot org 2006-05-27 08:30 -------
*** Bug 27765 has been marked as a duplicate of this bug. ***
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19777
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/19777] -fbounds-check catches non-existent bounds violation
[not found] <bug-19777-9410@http.gcc.gnu.org/bugzilla/>
` (9 preceding siblings ...)
2006-05-19 16:44 ` fxcoudert at gcc dot gnu dot org
@ 2006-05-24 22:00 ` fxcoudert at gcc dot gnu dot org
2006-05-27 8:31 ` fxcoudert at gcc dot gnu dot org
` (2 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-05-24 22:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from fxcoudert at gcc dot gnu dot org 2006-05-24 22:00 -------
Short enough for commit. Will do some testing before, and then check it in.
Thanks Andrew!
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|pinskia at gcc dot gnu dot |fxcoudert at gcc dot gnu dot
|org |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19777
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/19777] -fbounds-check catches non-existent bounds violation
[not found] <bug-19777-9410@http.gcc.gnu.org/bugzilla/>
` (8 preceding siblings ...)
2006-04-14 17:00 ` pinskia at gcc dot gnu dot org
@ 2006-05-19 16:44 ` fxcoudert at gcc dot gnu dot org
2006-05-24 22:00 ` fxcoudert at gcc dot gnu dot org
` (3 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-05-19 16:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from fxcoudert at gcc dot gnu dot org 2006-05-19 16:43 -------
Andrew, any news on this one? If I remember correctly, you're waiting for
paperwork with your new employer?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19777
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/19777] -fbounds-check catches non-existent bounds violation
[not found] <bug-19777-9410@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2006-02-20 20:53 ` anlauf at gmx dot de
@ 2006-04-14 17:00 ` pinskia at gcc dot gnu dot org
2006-05-19 16:44 ` fxcoudert at gcc dot gnu dot org
` (4 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-14 17:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from pinskia at gcc dot gnu dot org 2006-04-14 17:00 -------
*** Bug 27161 has been marked as a duplicate of this bug. ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |schnetter at aei dot mpg dot
| |de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19777
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/19777] -fbounds-check catches non-existent bounds violation
[not found] <bug-19777-9410@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2006-02-20 8:23 ` walter dot zimmer at dlr dot de
@ 2006-02-20 20:53 ` anlauf at gmx dot de
2006-04-14 17:00 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: anlauf at gmx dot de @ 2006-02-20 20:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from anlauf at gmx dot de 2006-02-20 20:53 -------
(In reply to comment #10)
> Strange: with gfortran gcc-4.1-20060210+fix x86_64-unknown-linux-gnu
> it compiles and runs fine:
> bash> gfortran gfcbug31.f -Wall -O0 -g -fbounds-check && ./a.out
> In init1: npts = 1
> i = 1
> Got here!
> done.
Sorry, mistake on my part. I downloaded a current binary for i386 which
apparently does not yet contain this patch. Good to know that it will
fix the problem.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19777
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/19777] -fbounds-check catches non-existent bounds violation
[not found] <bug-19777-9410@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2006-02-17 23:04 ` anlauf at gmx dot de
@ 2006-02-20 8:23 ` walter dot zimmer at dlr dot de
2006-02-20 20:53 ` anlauf at gmx dot de
` (6 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: walter dot zimmer at dlr dot de @ 2006-02-20 8:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from walter dot zimmer at dlr dot de 2006-02-20 08:23 -------
(In reply to comment #9)
> Negative. The following valid code still fails on i386:
Strange: with gfortran gcc-4.1-20060210+fix x86_64-unknown-linux-gnu
it compiles and runs fine:
bash> gfortran gfcbug31.f -Wall -O0 -g -fbounds-check && ./a.out
In init1: npts = 1
i = 1
Got here!
done.
So what could make this behaviour i386-specific?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19777
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/19777] -fbounds-check catches non-existent bounds violation
[not found] <bug-19777-9410@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2006-02-16 15:28 ` walter dot zimmer at dlr dot de
@ 2006-02-17 23:04 ` anlauf at gmx dot de
2006-02-20 8:23 ` walter dot zimmer at dlr dot de
` (7 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: anlauf at gmx dot de @ 2006-02-17 23:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from anlauf at gmx dot de 2006-02-17 23:04 -------
(In reply to comment #8)
[...]
> does not trigger the Array out-of-bounds-condition any more in our code.
> Therefore we are glad to have this fix!
>
> Tested on gcc-4.1-20060210 x86_64-unknown-linux-gnu
Negative. The following valid code still fails on i386:
% gfc gfcbug31.f -Wall -O0 -g -fbounds-check && ./a.out
In init1: npts = 1
i = 1
Fortran runtime error: Array reference out of bounds
% cat gfcbug31.f
program gfcbug31
implicit none
integer npts
parameter (npts=1)
double precision v(npts)
external init1
call init1 (npts, v)
end
subroutine init1 (npts, v)
implicit none
integer npts
c Assumed size arrays don't work together with -fbounds-check
double precision v(*)
c double precision v(npts)
integer i
print *, "In init1: npts =", npts
do 10 i = 1, npts
print *, "i =", i
v(i) = 0
print *, "Got here!"
10 continue
print *, "done."
end
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19777
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/19777] -fbounds-check catches non-existent bounds violation
[not found] <bug-19777-9410@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2006-02-08 21:56 ` fxcoudert at gcc dot gnu dot org
@ 2006-02-16 15:28 ` walter dot zimmer at dlr dot de
2006-02-17 23:04 ` anlauf at gmx dot de
` (8 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: walter dot zimmer at dlr dot de @ 2006-02-16 15:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from walter dot zimmer at dlr dot de 2006-02-16 15:28 -------
(In reply to comment #6)
> Here is a newer patch which fixes it:
I didn't look (or even understand) what the patch does, but I can contribute
empirical evidence that the following construct:
SUBROUTINE FOO (N, AB)
INTEGER N
DOUBLE PRECISION AB(N, *)
AB(5,5) = 0.0
does not trigger the Array out-of-bounds-condition any more in our code.
Therefore we are glad to have this fix!
Tested on gcc-4.1-20060210 x86_64-unknown-linux-gnu
--
walter dot zimmer at dlr dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |walter dot zimmer at dlr dot
| |de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19777
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/19777] -fbounds-check catches non-existent bounds violation
[not found] <bug-19777-9410@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2006-01-03 18:36 ` pinskia at gcc dot gnu dot org
@ 2006-02-08 21:56 ` fxcoudert at gcc dot gnu dot org
2006-02-16 15:28 ` walter dot zimmer at dlr dot de
` (9 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-02-08 21:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from fxcoudert at gcc dot gnu dot org 2006-02-08 21:56 -------
(In reply to comment #6)
> - if (flag_bounds_check)
> + if (flag_bounds_check && ar->as->type != AS_ASSUMED_SIZE)
Andrew, I think your patch is doing the right thing. Could you please submit it
for formal review on fortran@gcc?
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fxcoudert at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19777
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/19777] -fbounds-check catches non-existent bounds violation
[not found] <bug-19777-9410@http.gcc.gnu.org/bugzilla/>
2005-12-14 0:18 ` pinskia at gcc dot gnu dot org
2006-01-02 19:44 ` pinskia at gcc dot gnu dot org
@ 2006-01-03 18:36 ` pinskia at gcc dot gnu dot org
2006-02-08 21:56 ` fxcoudert at gcc dot gnu dot org
` (10 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-03 18:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pinskia at gcc dot gnu dot org 2006-01-03 18:36 -------
Here is a newer patch which fixes it:
Index: trans-array.c
===================================================================
--- trans-array.c (revision 109225)
+++ trans-array.c (working copy)
@@ -1942,7 +1942,7 @@ gfc_conv_array_ref (gfc_se * se, gfc_arr
gfc_conv_expr_type (&indexse, ar->start[n], gfc_array_index_type);
gfc_add_block_to_block (&se->pre, &indexse.pre);
- if (flag_bounds_check)
+ if (flag_bounds_check && ar->as->type != AS_ASSUMED_SIZE)
{
/* Check array bounds. */
tree cond;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19777
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/19777] -fbounds-check catches non-existent bounds violation
[not found] <bug-19777-9410@http.gcc.gnu.org/bugzilla/>
2005-12-14 0:18 ` pinskia at gcc dot gnu dot org
@ 2006-01-02 19:44 ` pinskia at gcc dot gnu dot org
2006-01-03 18:36 ` pinskia at gcc dot gnu dot org
` (11 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-02 19:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pinskia at gcc dot gnu dot org 2006-01-02 19:44 -------
I have a patch for this which I need to test.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19777
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/19777] -fbounds-check catches non-existent bounds violation
[not found] <bug-19777-9410@http.gcc.gnu.org/bugzilla/>
@ 2005-12-14 0:18 ` pinskia at gcc dot gnu dot org
2006-01-02 19:44 ` pinskia at gcc dot gnu dot org
` (12 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-14 0:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2005-12-14 00:18 -------
*** Bug 25401 has been marked as a duplicate of this bug. ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |cummings at cacr dot caltech
| |dot edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19777
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2006-06-03 16:08 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20050203104947.19777.sfilippone@uniroma2.it>
2005-02-07 4:25 ` [Bug fortran/19777] -fbounds-check catches non-existent bounds violation pinskia at gcc dot gnu dot org
2005-04-11 23:50 ` pinskia at gcc dot gnu dot org
[not found] <bug-19777-9410@http.gcc.gnu.org/bugzilla/>
2005-12-14 0:18 ` pinskia at gcc dot gnu dot org
2006-01-02 19:44 ` pinskia at gcc dot gnu dot org
2006-01-03 18:36 ` pinskia at gcc dot gnu dot org
2006-02-08 21:56 ` fxcoudert at gcc dot gnu dot org
2006-02-16 15:28 ` walter dot zimmer at dlr dot de
2006-02-17 23:04 ` anlauf at gmx dot de
2006-02-20 8:23 ` walter dot zimmer at dlr dot de
2006-02-20 20:53 ` anlauf at gmx dot de
2006-04-14 17:00 ` pinskia at gcc dot gnu dot org
2006-05-19 16:44 ` fxcoudert at gcc dot gnu dot org
2006-05-24 22:00 ` fxcoudert at gcc dot gnu dot org
2006-05-27 8:31 ` fxcoudert at gcc dot gnu dot org
2006-05-27 9:41 ` fxcoudert at gcc dot gnu dot org
2006-06-03 16:08 ` 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).