Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

Run-Time Check Failure #2 - Stack around the variable '_RUNTIME$IDAY' was corrupted.

$
0
0

I bought the intel fortran and visual studio 2013, I ran a simple example program which ran well in my old fortran compiler, but it did not run on this intel fortran.  I use debug mode and found the problem in one small subroutine:

    

      SUBROUTINE RUNTIME

      INTEGER*2 IYEAR,IMONTH,IDAY,IHOUR,IMIN,ISEC,I100TH

      CALL GETDAT(IYEAR,IMONTH,IDAY)

      CALL GETTIM(IHOUR,IMIN,ISEC,I100TH)

      IF ( IHOUR .LE. 12 ) THEN

           WRITE(*,9001) IHOUR,IMIN,ISEC,I100TH,IMONTH,IDAY,IYEAR

      ELSE

           IHOUR = IHOUR-12

           WRITE(*,9002) IHOUR,IMIN,ISEC,I100TH,IMONTH,IDAY,IYEAR

      ENDIF

 

9001 FORMAT(/3X,'Time: ',I2.2,':',I2.2,':',I2.2,'.',I2.2,' am',

     +        3X,'Date: ',I2.2,'-',I2.2,'-',I4.4)

9002 FORMAT(/3X,'Time: ',I2.2,':',I2.2,':',I2.2,'.',I2.2,' pm',

     +        3X,'Date: ',I2.2,'-',I2.2,'-',I4.4)

 

      RETURN

      END

 

The error message is:

Run-Time Check Failure #2 - Stack around the variable '_RUNTIME$IDAY' was corrupted.

 

Do you have any idea what was wrong with this subroutine ?


Viewing all articles
Browse latest Browse all 5691

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>