Quantcast
Channel: Intel® Fortran Compiler for Linux* and macOS*
Viewing all articles
Browse latest Browse all 2583

Bug in pfxint8get() in ifort

$
0
0

Compiler Versions: 15.0.2, 17.0.0

OS: RHEL 6.8

Kernel: 2.6.32-642.4.2 64-bit

Compile lines:

Works fine:    ifort -O3 -o test1 mopen.F
Gives wierd results: ifort -check all -o test2 mopen.F

The test1 and test2 executables produce two completely different results.

 

 

The following code produces this error:

        program htemp
        use ifposix
        implicit none
        integer(8) islen
        character*16 myfile
        integer(4) lename,ipxflag,ipxmode,ipxfd,ipxerr,ipxlen4
        integer(4) :: jstat_h
        integer(8) :: ipxlen

! open the signal
        myfile="mopen.F"
        write(6,*)  'opening ',myfile
        ipxflag=IPXFCONST('O_RDONLY')
        ipxmode=0
        lename=len_trim(myfile)
        call PXFOPEN(myfile,lename,ipxflag,ipxmode,ipxfd,ipxerr)
        write(6,*)  'PXFOPEN returned ',ipxfd
        if(ipxerr.gt.0) stop

        call pxfstructcreate('stat',jstat_h,ipxerr) ! create stat structure
        call pxffstat(ipxfd,jstat_h,ipxerr)
        call pxfint8get(jstat_h,'st_size',ipxlen,ipxerr)
        write(6,*)  'pxfint8get returned st_size ',ipxlen
        call pxfintget(jstat_h,'st_size',ipxlen4,ipxerr)
        write(6,*)  'pxfintget  returned st_size ',ipxlen4

        call pxfstat(myfile,lename,jstat_h,ipxerr)
        call pxfint8get(jstat_h,'st_size',ipxlen,ipxerr)
        write(6,*)  'pxfint8get returned st_size ',ipxlen
        call pxfintget(jstat_h,'st_size',ipxlen4,ipxerr)
        write(6,*)  'pxfintget  returned st_size ',ipxlen4

        INQUIRE(file=myfile,size=islen)
        write(6,*)  'INQUIRE    returned         ',islen
        call pxfstructfree(jstat_h,ipxerr)
        contains


        end program htemp

 

Thread Topic: 

Bug Report

Viewing all articles
Browse latest Browse all 2583

Trending Articles



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