[Bug fortran/53542] New: Diagnostic of USE-associated variables shows original instead of renamed symbol name

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu May 31 15:23:00 GMT 2012


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

             Bug #: 53542
           Summary: Diagnostic of USE-associated variables shows original
                    instead of renamed symbol name
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org


Found during the PR 53537 investigation.

Renamed USE associated variables have for symtree->name the renamed name but
for symtree->n.sym->name the original name. That leads to error messages such
as the following; note the "dp" vs. "wp":

        real(wp) :: x
             1
Error: Parameter 'dp' at (1) has not been declared or is a variable, which does
not reduce to a constant expression


Test case:

module select_precision
    integer :: dp = kind(1.0)
end module select_precision

module ode_types
    use select_precision, only: wp => dp
contains
    subroutine ode_derivative(x)
        real(wp) :: x
    end subroutine ode_derivative
end module ode_types



More information about the Gcc-bugs mailing list