public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/36683] New: -fbounds-check failure for allocated array and spread
@ 2008-07-01 5:22 terry at chem dot gu dot se
2008-07-01 19:22 ` [Bug fortran/36683] " tkoenig at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: terry at chem dot gu dot se @ 2008-07-01 5:22 UTC (permalink / raw)
To: gcc-bugs
Unconformable array operations are not being picked up in the following:
[tjf@rscpc28 Stoopid]$ cat badness.f90
program fred
implicit none
real,dimension(:,:),allocatable::A
real,dimension(5)::v
allocate(A(5,5))
A=5
v=5
A=A/spread(v,2,3)
write(*,*)A(1,:)
write(*,*)A(2,:)
write(*,*)A(3,:)
write(*,*)A(4,:)
write(*,*)A(5,:)
end
[tjf@rscpc28 Stoopid]$ gfortran -Wall -O0 -W -Wtabs -g -fbounds-check -o
badness badness.f90
[tjf@rscpc28 Stoopid]$ ./badness
1.00000000 1.00000000 1.00000000 5.0000000 5.0000000
1.00000000 1.00000000 1.00000000 5.0000000 5.0000000
1.00000000 1.00000000 1.00000000 5.0000000 5.0000000
1.00000000 1.00000000 1.00000000 5.0000000 5.0000000
1.00000000 1.00000000 1.00000000 5.0000000 5.0000000
[tjf@rscpc28 Stoopid]$ gfortran -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.3-20080522/configure --disable-multilib
--enable-languages=c,c++,fortran
Thread model: posix
gcc version 4.3.1 20080522 (prerelease) (GCC)
Making the spread array too big [spread(v,2,13)] is not detected either. My
quick attempts to do both in a single code caused glibc to freak out with
"double free or corruption" detection.
--
Summary: -fbounds-check failure for allocated array and spread
Product: gcc
Version: 4.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: terry at chem dot gu dot se
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36683
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/36683] -fbounds-check failure for allocated array and spread
2008-07-01 5:22 [Bug fortran/36683] New: -fbounds-check failure for allocated array and spread terry at chem dot gu dot se
@ 2008-07-01 19:22 ` tkoenig at gcc dot gnu dot org
2008-10-12 12:11 ` tkoenig at gcc dot gnu dot org
2009-04-29 14:20 ` dominiq at lps dot ens dot fr
2 siblings, 0 replies; 4+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2008-07-01 19:22 UTC (permalink / raw)
To: gcc-bugs
--
tkoenig at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |34670
nThis| |
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-07-01 19:21:45
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36683
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/36683] -fbounds-check failure for allocated array and spread
2008-07-01 5:22 [Bug fortran/36683] New: -fbounds-check failure for allocated array and spread terry at chem dot gu dot se
2008-07-01 19:22 ` [Bug fortran/36683] " tkoenig at gcc dot gnu dot org
@ 2008-10-12 12:11 ` tkoenig at gcc dot gnu dot org
2009-04-29 14:20 ` dominiq at lps dot ens dot fr
2 siblings, 0 replies; 4+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2008-10-12 12:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from tkoenig at gcc dot gnu dot org 2008-10-12 12:09 -------
The front end obligingly fills out the descriptor for
the libray with an extent of 3:
atmp.5.dim[1].stride = 5;
atmp.5.dim[1].lbound = 0;
atmp.5.dim[1].ubound = 2;
atmp.5.data = (void *) &A.6;
atmp.5.offset = 0;
_gfortran_spread (&atmp.5, &parm.4, &C.1545, &C.1546);
It does so without checking conformance with the rest of
the expression.
--
tkoenig at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tkoenig at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36683
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/36683] -fbounds-check failure for allocated array and spread
2008-07-01 5:22 [Bug fortran/36683] New: -fbounds-check failure for allocated array and spread terry at chem dot gu dot se
2008-07-01 19:22 ` [Bug fortran/36683] " tkoenig at gcc dot gnu dot org
2008-10-12 12:11 ` tkoenig at gcc dot gnu dot org
@ 2009-04-29 14:20 ` dominiq at lps dot ens dot fr
2 siblings, 0 replies; 4+ messages in thread
From: dominiq at lps dot ens dot fr @ 2009-04-29 14:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from dominiq at lps dot ens dot fr 2009-04-29 14:20 -------
pr39286 is a duplicate of this one.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36683
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-04-29 14:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-01 5:22 [Bug fortran/36683] New: -fbounds-check failure for allocated array and spread terry at chem dot gu dot se
2008-07-01 19:22 ` [Bug fortran/36683] " tkoenig at gcc dot gnu dot org
2008-10-12 12:11 ` tkoenig at gcc dot gnu dot org
2009-04-29 14:20 ` dominiq at lps dot ens dot fr
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).