This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/36670] New: Missing compile-time checks on sum and product
- From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Jun 2008 19:46:26 -0000
- Subject: [Bug fortran/36670] New: Missing compile-time checks on sum and product
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Runtime checks are OK, compile-time checks are better.
$ cat sum.f90
program main
real, dimension(3,3) :: a
real, dimension(2) :: b
a = 21.
b = sum(a,dim=1)
end program main
$ gfortran -fbounds-check sum.f90
$ ./a.out
Fortran runtime error: Incorrect extent in return value of SUM intrinsic in
dimension 1: is 2, should be 3
$ cat product.f90
program main
real, dimension(3,3) :: a
real, dimension(2) :: b
a = 21.
b = product(a,dim=1)
end program main
$ gfortran -fbounds-check product.f90
$ ./a.out
Fortran runtime error: Incorrect extent in return value of PRODUCT intrinsic in
dimension 1: is 2, should be 3
--
Summary: Missing compile-time checks on sum and product
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tkoenig at gcc dot gnu dot org
OtherBugsDependingO 27766
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36670