This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/16907] New: Non-integer array indices rejected


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]