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/34901] New: add kind information to mismatched-types error message


gfortran correctly complains about mismatched types in the code below. However,
adding the kinds of the data types would make the message even more informative
(see below).

$> cat real-real.f90
REAL(4) :: x
print *, f(x)

CONTAINS
  FUNCTION f(a)
    REAL(8) :: a, f
    a = 3.1415
  END FUNCTION
END

$> gfortran-svn -g -Wall real-real.f90
real-real.f90:2.11:

print *, f(x)
          1
Error: Type mismatch in argument 'a' at (1); passed REAL to REAL
                                             ^^^^^^^^^^^^^^^^^^^

$> gfortran-svn -v
gcc version 4.3.0 20080116 (experimental)

FYI: 4.1/4.2 gave:
Error: Type/rank mismatch in argument 'a' at (1)


-- 
           Summary: add kind information to mismatched-types error message
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: enhancement
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dfranke at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34901


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