--- Comment #7 from dfranke at gcc dot gnu dot org 2009-04-04 18:29 ---
$ gfortran-4.3.3 -Wall -g -W -fbounds-check pr28849.f90 && ./a.out
Assignments with correct shapes after RESHAPE...
a(:,1) = 1.000
b(:,1) = 1.000 2.000
...and with wrong shape (should fail w
--
fxcoudert at gcc dot gnu dot org changed:
What|Removed |Added
AssignedTo|fxcoudert at gcc dot gnu dot|unassigned at gcc dot gnu
|org
--- Comment #6 from burnus at gcc dot gnu dot org 2006-11-08 20:48 ---
> In this case neither sunf95 nor NAGf95 find the error.
This is actually wrong; both find it.
In my example the original tree looks like (shortend): foo (__result, n)
ubound.0 = (int8) *n;
S.4 = 1;
w
--- Comment #5 from burnus at gcc dot gnu dot org 2006-11-08 20:08 ---
Postscriptum:
sunf95 already finds the problem in the program "check" at compile time.
For non-intrinsics (non libgfortran) routines, one way to do it is too do it in
the function called. (Internally called as foo (
--- Comment #4 from burnus at gcc dot gnu dot org 2006-11-08 19:44 ---
See also PR 29572 (matmul(a,b) and matmul(a,transpose(b))).
sunf95 and NAG f95 catch this PR and also PR29572 and also pack().
g95 catches this PR and matmul(a,b), but not matmul(a,transpose(b))).
ifort 9.1 (and 10.0
--- Comment #3 from anlauf at gmx dot de 2006-10-11 13:58 ---
(In reply to comment #2)
> I'll note that the Portland, Intel and g95 compilers do not see this issue
> either.
Well, I get a bounds violation with current versions of g95 (0.91)
on both Linux and Cygwin:
% g95 -g -fbounds-c
--- Comment #2 from fxcoudert at gcc dot gnu dot org 2006-10-11 13:17
---
I'll note that the Portland, Intel and g95 compilers do not see this issue
either. SunStudio does, at runtime.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28849
--
fxcoudert at gcc dot gnu dot org changed:
What|Removed |Added
CC||fxcoudert at gcc dot gnu dot
|
--- Comment #1 from anlauf at gmx dot de 2006-08-25 20:40 ---
Created an attachment (id=12140)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12140&action=view)
Sample RESHAPE with missed array bounds violation
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28849