Ladies and Gentlemen:

In a module, before the CONTAINS statement, I have the following declaration:

  CHARACTER (OpconNameLength, ASCIICharacterKind), SAVE :: &
    CH_IMAG(UDDEFT) = "    "

where OpconNameLength, UDDEFT, are integer parameters. 

The parameter ASCIICharacterKind is defined as follows:

  integer(DefaultInteger), parameter :: ASCIICharacterKind = kind ("A")

and 

  integer, parameter :: DefaultInteger = kind (1)

  Here is a module procedure in the same module:

  pure function getNickname_imer (TypeName) result (NickName)

    character (*, ASCIICharacterKind), intent(IN) :: TypeName
    character (IdLength, ASCIICharacterKind) :: NickName

    integer (DefaultInteger) :: K
    character (len(CH_IMAG), kind(CH_IMAG)) :: LName

    LName = adjustl (TypeName)
    K = UDType(LName)
    if (K /= 0) then
      NickName = UDNicknames(K)
    else
      NickName = " "
    endif

  end function getNickname_imer

  Version 4.3.0 of the gfortran compiler is issuing the following error:

/home/norm/design/source/chrimerM.f90:912.42:

    character (len(CH_IMAG), kind(CH_IMAG)) :: LName
                                         1
Error: Kind 0 is not a CHARACTER kind at (1)

  I do not believe this is an error. The following compilers compile this code:
Intel (Windows), Lahey (Linux, Windows), g95 (Linux) and NAG (Linux).

  Thank you for your attention.

Norm Clerman


-- 
           Summary: problem with intrinsic function KIND
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: clerman at fuse dot net


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

Reply via email to