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/35770] New: implicit character(s) hides type of internal function


The program gives an error message when the internal
function has an apparent character type due to the implicit
statement.  Commenting out the implicit fixes it.  This
looks similar to 34784 to me.

      program SA0021

! fails on Windows XP
! gcc version 4.4.0 20080312 (experimental) [trunk revision 133139]
!maybe also see 34784?


      implicit character (s)  ! removing this fixes the problem
      REAL RDA(10)
      RDA = 0

      RDA(J1) = S_REAL_SQRT_I(RDA(J1))

      CONTAINS

      ELEMENTAL FUNCTION S_REAL_SQRT_I(X) RESULT (R)
      REAL, INTENT(IN)  ::  X
      REAL              ::  R
        R = 0.0
      END FUNCTION S_REAL_SQRT_I     !internal procedure

      END

gfortran:gfortran sa0021.f
sa0021.f:11.16:

      RDA(J1) = S_REAL_SQRT_I(RDA(J1))
               1
Error: Can't convert CHARACTER(1) to REAL(4) at (1)


-- 
           Summary: implicit character(s) hides type of internal function
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dick dot hendrickson at gmail dot com


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


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