This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/29505] New: Should give an error when using: real :: r; r(j) = ...
- From: "tobias dot burnus at physik dot fu-berlin dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Oct 2006 19:09:25 -0000
- Subject: [Bug fortran/29505] New: Should give an error when using: real :: r; r(j) = ...
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following program compiles in gfortran.
I don't know how easily it could be detected, but defining a scalar and using
it as an array should be detectable?
For what it is worth: ifort also does not detect this error.
Changing the "integer :: j = 1" into "integer :: j; j = 1" causes gfortran to
emit an error: "Unexpected STATEMENT FUNCTION statement" (and also ifort now
writes: "This name has not been declared as an array or a function.")
------------------------
program bug
implicit none
real :: del
integer :: j = 1
del(j)=sin(10.0)
print *, del(3)
end
------------------------
--
Summary: Should give an error when using: real :: r; r(j) = ...
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: enhancement
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=29505