This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/16907] New: Non-integer array indices rejected
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Aug 2004 22:26:07 -0000
- Subject: [Bug fortran/16907] New: Non-integer array indices rejected
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following code is accepted without warning by g77, but rejected
by gfortran:
====================================
integer I, A(10)
I=A(1.0)
end
====================================
In file bug.f:2
I=A(1.0)
1
Error: Array index at (1) must be of INTEGER type
But I suppose there's lots of code containing non-integer array indices
so IMHO this should only be a warning in gfortran (and an error with
-pedantic like in g77).
This issue is similar to the non-integer loop variables in PR 16222.
--
Summary: Non-integer array indices rejected
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16907