https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90198
Bug ID: 90198 Summary: internal compiler error: in convert_move, at expr.c:229 Product: gcc Version: 7.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: g.granda at irya dot unam.mx Target Milestone: --- Hello gcc users, While trying to compile a fortran code, I obtained the following error: flash_err.f90:31:0: l_t_field=rho_0*heat_function_field*(1E7*1.184E5/(temp+1000)**2*exp(-1.184E5/(temp+1000))+1.4E-2*(0.5*temp**(-0.5)*exp(-92/temp)+sqrt(temp)*92/temp**2*exp(-92/temp)))/sim_m_proton internal compiler error: in convert_move, at expr.c:229 Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions. I compiled it the following way: gfortran -ffree-line-length-none flash_err.f90 -o flash.exe Here you have some compiler information: Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.3.0-27ubuntu1~18.04' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 7.3.0 (Ubuntu 7.3.0-27ubuntu1~18.04) I tried to compile the same code using gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC) and I got the same error. The code I used is: program test implicit none real:: sim_temp,sim_num_dens,sim_k,sim_cond,sim_box_size,sim_pi real::sim_m_proton,sim_gamma,sim_mu_mol,sim_gasconstant,sim_boltzmann real,dimension(4) :: coeff sim_m_proton=1.6726219E-24 sim_gamma=1.66666666 sim_mu_mol=1.27 sim_gasconstant=8.3144598E-7 sim_boltzmann=1.38064852E-16 sim_pi=3.14159265 sim_temp=729.5 sim_num_dens=3.0 sim_box_size=10*3.085678E18 sim_k=2*sim_pi/sim_box_size sim_cond=67524.2086 call coeficients(sim_temp,sim_num_dens,sim_k,sim_cond,coeff) contains !!!!!!!!!!!!!!!!!! Initial velocity functions !!!!!!!!!!!!!!!!!!!!! real function cool_function_field(temp) real, intent(in) :: temp cool_function_field=heat_function_field()*(1.0E7*exp(-1.184E5/(temp+1000))+1.4*1e-2*sqrt(temp)*exp(-92/temp))/sim_m_proton end function cool_function_field real function l_t_field(temp,nh) real,intent(in):: temp,nh real :: rho_0 rho_0=sim_m_proton*nh l_t_field=rho_0*heat_function_field*(1E7*1.184E5/(temp+1000)**2*exp(-1.184E5/(temp+1000))+1.4E-2*(0.5*temp**(-0.5)*exp(-92/temp)+sqrt(temp)*92/temp**2*exp(-92/temp)))/sim_m_proton end function l_t_field real function heat_function_field() heat_function_field=2.0E-26/sim_m_proton end function heat_function_field real function sound_speed(temp) real,intent(in):: temp sound_speed=sqrt(sim_gamma*sim_boltzmann*temp/(sim_mu_mol*sim_m_proton)) end function sound_speed real function kappa_rho(temp,nh) real,intent(in):: temp,nh real:: rho_0 rho_0=sim_m_proton*nh kappa_rho=sim_mu_mol*rho_0*cool_function_field(temp)/(sim_gasConstant*sound_speed(temp)*temp) end function kappa_rho real function kappa_t(temp,nh) real,intent(in):: temp,nh kappa_t=sim_mu_mol*(sim_gamma-1)*l_t_field(temp,nh)/(sim_gasConstant*sound_speed(temp)) end function kappa_t real function kappa_k(temp,nh,cond) real,intent(in):: temp,nh,cond real :: rho_0 rho_0=sim_m_proton*nh kappa_k=sim_gasConstant*sound_speed(temp)*rho_0/(sim_mu_mol*(sim_gamma-1)*cond) end function kappa_k real function omega(cond,temp,nh,w,k) real, intent(in) :: cond,temp,nh,w,k omega=w**3+w**2*sound_speed(temp)*kappa_t(temp,nh)+k**2/kappa_k(temp,nh,cond)+w*sound_speed(temp)**2*k**2+sound_speed(temp)**3.0*k**2/sim_gamma*(kappa_t(temp,nh)-kappa_rho(temp,nh)+k**2/kappa_k(temp,nh,cond)) end function omega !!!! solver !!! SUBROUTINE laguer(a,m,x,its) INTEGER m,its,MAXIT,MR,MT REAL EPSS COMPLEX a(m+1),x PARAMETER (EPSS=2.e-7,MR=8,MT=10,MAXIT=MT*MR) INTEGER iter,j REAL abx,abp,abm,err,frac(MR) COMPLEX dx,x1,b,d,f,g,h,sq,gp,gm,g2 SAVE frac DATA frac /.5,.25,.75,.13,.38,.62,.88,1./ do 12 iter=1,MAXIT its=iter b=a(m+1) err=abs(b) d=cmplx(0.,0.) f=cmplx(0.,0.) abx=abs(x) do 11 j=m,1,-1 f=x*f+d d=x*d+b b=x*b+a(j) err=abs(b)+abx*err 11 continue err=EPSS*err if(abs(b).le.err) then return else g=d/b g2=g*g h=g2-2.*f/b sq=sqrt((m-1)*(m*h-g2)) gp=g+sq gm=g-sq abp=abs(gp) abm=abs(gm) if(abp.lt.abm) gp=gm if (max(abp,abm).gt.0.) then dx=m/gp else dx=exp(cmplx(log(1.+abx),float(iter))) endif endif x1=x-dx if(x.eq.x1)return if (mod(iter,MT).ne.0) then x=x1 else x=x-dx*frac(iter/MT) endif 12 continue return END subroutine coeficients(temp,nh,k,cond,coef) real, intent(in):: temp,nh,cond,k real, intent(out),dimension(4):: coef coef(1)=1 coef(2)=sound_speed(temp)*kappa_t(temp,nh) coef(3)=sound_speed(temp)**2*k**2 coef(4)=k**2/kappa_k(temp,nh,cond)+sound_speed(temp)**3.0*k**2/sim_gamma*(kappa_t(temp,nh)-kappa_rho(temp,nh)+k**2/kappa_k(temp,nh,cond)) end subroutine coeficients end program I hope you can help to find out what is wrong in my code and to solve this issue. Cheers, Guido