Enabling inlining causes error

I developed code using Intel Fortran, and I am now porting it to PGI. When I enable inlining, I get an “error F0000 : Internal compiler error. readin_func:can’t scan 1st line”

The following two posts are relevant. The old post is almost exactly my problem, which the more recent post claims was fixed long ago.
http://www.pgroup.com/userforum/viewtopic.php?p=3800&sid=9d4c4a1bae60ca8c58c078c797497d70
http://www.pgroup.com/userforum/viewtopic.php?p=16054&sid=a6a72063b48df0aed21c26452b07cc1e
I am using PVF 13.10. The following two files, when compiled with inlining enabled, reproduce this error. Any thoughts?

ConsoleApp.f90

      program Prog
      use AttenuationFilter
      implicit none
      call test_attenuation()
      end program Prog

AttenuationFilter.f90

module AttenuationFilter
    implicit none
    real, parameter :: &
        Pr = 101.325, & 
        T0 = 293.15, &
        T01 = 273.16

    contains
    
    subroutine test_attenuation()
        real :: Pa,f,hr,T,s
        integer :: i
        f = 1000.  !Hz !!!!TODO!!!! Is this Hz?
        Pa = 101.325 !kPa
        T = 273.15 + 40.
        hr = .5
        s = 500.        
        
        write(*,*) "Checking attenuation with frequency..."
        do i = 1,10
            write(*,*) "   ",10.**i,attenuation(Pa,10.**i,hr,T,s),&
                attenuated_amplitude(attenuation(Pa,10.**i,hr,T,s),1.)
        enddo
        write(*,*) "Checking attenuation with humidity..."
        do i = 0,10
            write(*,*) "   ",.1*i,attenuation(Pa,f,.1*i,T,s),&
                attenuated_amplitude(attenuation(Pa,f,.1*i,T,s),1.)
        enddo
        write(*,*) "Checking attenuation with pressure..."
        do i = 1,10
            write(*,*) "   ",10.*i,attenuation(10.*i,f,hr,T,s),&
                attenuated_amplitude(attenuation(10.*i,f,hr,T,s),1.)
        enddo
        write(*,*) "Checking attenuation with temperature..."
        do i = 1,10
            write(*,*) "   ",100.*i,attenuation(Pa,f,hr,100.*i,s),&
                attenuated_amplitude(attenuation(Pa,f,hr,100.*i,s),1.)
        enddo
    end subroutine    
    
    real function attenuation(Pa,f,hr,T,s)
        real, intent(in) :: Pa,f,hr,T,s
        attenuation = 1.
    end function
    
    
    real function attenuated_amplitude(attenuation,Pi)
        real, intent(in) :: attenuation, Pi
        real :: x
        x = 1./(10. * log((exp(1.))**2.))
        attenuated_amplitude = Pi * exp(-x * attenuation) ![Pa] 
    end function
    
    
end module

Build output:

c:\program files\pgi\win64\13.10\bin\pgfortran.exe -Hx,123,8 -Hx,123,0x40000 -Hx,0,0x40000000 -Mx,0,0x40000000 -Hx,0,0x20000000 -Bstatic -Mbackslash -Mfree -I"c:\program files\pgi\win64\13.10\include" -I"C:\Program Files\PGI\Microsoft Open Tools 11\include" -I"C:\Program Files (x86)\Windows Kits\8.0\Include\shared" -I"C:\Program Files (x86)\Windows Kits\8.0\Include\um" -fastsse -Mipa=fast,inline -O3 -Minline -Minform=warn -module "x64\Release" -o "x64\Release\AttenuationFilter.obj" -c "C:\Users\Andrew Wilson\Documents\Visual Studio 2012\Projects\InliningProblem\AttenuationFilter.f90"

Command exit code: 2

Command output: [C:\Users\Andrew Wilson\Documents\Visual Studio 2012\Projects\InliningProblem\AttenuationFilter.f90(21) : error F0000 : Internal compiler error. readin_func:can't scan 1st line 297 PGF90/x86-64 Windows 13.10-0: compilation aborted ]

Hi Andrew,

Thank you for the example. I was able to reproduce the problem. I looks like an issue where the compiler isn’t quoting a file path when creating a temp file used in inline extraction. Hence, when the path contains a space, this causes problems.

I sent a report to engineering (TPR#19775) for further investigation.

Best Regards,
Mat

Hey, Mat,

Thanks for the update. Let me know if there’s any news.

– Andrew

Hi Andrew,

It looks like TPR#19775 was fixed in 14.3.

  • Mat