3 Replies Latest reply on Oct 25, 2011 7:11 AM by santosh.zanjurne

    Compiler Bug(?)

    andersartig

      Hello

       

      The code below make a compiler-bug:

      openf95 INTERNAL ERROR: 

      mfef95 died due to signal 11

       

      Other Compilers don't have problems with this construction.

      With best regards

      Axel

       

       

       

       

      MODULE STRINGS_MODULE

      PUBLIC

      INTERFACE OPERATOR (+)

        MODULE PROCEDURE UPPER_CASE

      END INTERFACE

      contains

              FUNCTION UPPER_CASE(OLD) RESULT(NEW)

                IMPLICIT NONE

                CHARACTER(*), INTENT(IN):: OLD

                CHARACTER(LEN(OLD))     :: NEW

                INTEGER(4)              :: I,ISVAR

                NEW=OLD

                DO I=1,LEN(TRIM(OLD))

                  ISVAR=IACHAR(OLD(I:I))

                  IF(ISVAR.GE.97.AND.ISVAR.LE.122) NEW(I:I)=ACHAR(ISVAR-32)

                ENDDO

              END FUNCTION UPPER_CASE

      !

       

       

      END MODULE STRINGS_MODULE      

       

            SUBROUTINE problem()

             USE STRINGS_MODULE

            IMPLICIT NONE

            CHARACTER(120)       :: LINE

              LINE=''

              WRITE(*,FMT='(A)')+TRIM(LINE)

            STOP

            END