https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82004

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Andrey Guskov from comment #2)
> Approximately a hundred different variables and function calls, the majority
> of which are raised to the second or third power, sometimes fourth or fifth.
> As 628.pop2_s is mostly written in Fortran 90, all of the cases look like
> c**x. I`m not sure if this gets transformed into pow() when x is constant,
> though.
> 
> As for the cases where x is either not constant or non-integer, there are 22
> of them:
> 
> co2calc.F90:          x1(i) = c10 ** (-phhi(i))
> co2calc.F90:          x2(i) = c10 ** (-phlo(i))
> 
> ecosys_mod.F90:       Tfunc = Q_10**(((TEMP + T0_Kelvin)-(Tref +
> T0_Kelvin))/c10)
> ecosys_mod.F90:       zoo_loss = z_mort2 * Zprime**1.4_r8 + z_mort * Zprime
> ecosys_mod.F90:       TfuncS = 2.5_r8**(((TEMP + T0_Kelvin) - (Tref +
> T0_Kelvin)) / c10)
> 
> hmix_del4.F90:        AMF(:,:,iblock) =
> (UAREA(:,:,iblock)/uarea_equator)**1.5
> hmix_del4.F90:        AHF(:,:,iblock) =
> (TAREA(:,:,iblock)/uarea_equator)**1.5
> 
> hmix_gm.F90:          BOLUS_SP(:,:,bid) = 50.0_r8 * sqrt(U_ISOP**c2 +
> V_ISOP**c2)
> 
> overflows.F90:        phi = c1-Fgeo**(-c2/c3)
> 
> seq_flux_mct.F90:     anidr = (.026_R8/(cosz**1.7_R8 + 0.065_R8))
> shr_flux_mod.F90:     temp = (zkB*zkB)**(1.0_R8/a2) ! note: zkB < 0, zkB*zkB
> > 0
> shr_flux_mod.F90:     temp = (zeta*zeta)**(1.0_R8/a2) ! note: zeta < 0,
> zeta*zeta > 0
> 
> state_mod.F90:        st15 = salt**(1.5_r8)
> 
> sw_absorption.F90:    chlamnt = 10**(logchl)
> 
> time_management.F90:  ifact = 10**(string_length - n)
> 
> vmix_kpp.F90:         cg = cstar*vonkar*(c_s*vonkar*epssfc)**p33
> vmix_kpp.F90:         bckgrnd_vdc_psis=
> bckgrnd_vdc_psim*exp(-(0.4_r8*(tlatd+28.9_r8))**c2)
> vmix_kpp.F90:         bckgrnd_vdc_psin=
> bckgrnd_vdc_psim*exp(-(0.4_r8*(tlatd-28.9_r8))**c2)
> vmix_kpp.F90:         bckgrnd_vdc1 * (tlatd/10.0_r8)**c2
> vmix_kpp.F90:         WM(i,j) = vonkar*USTAR(i,j)*(c1 - c16*ZETA(i,j))**p25
> vmix_kpp.F90:         WM(i,j) =
> vonkar*(a_m*(USTAR(i,j)**3)-c_m*ZETAH(i,j))**p33
> vmix_kpp.F90:         WS(i,j) =
> vonkar*(a_s*(USTAR(i,j)**3)-c_s*ZETAH(i,j))**p33
> 
> 
> ...Something tells me I didn`t get the question.

;)  We're doing the transform only for constant 'c' -- a constant may be
exposed
through optimization but it is more likely constant from the start.

I spot 10 and 2.5_r8 above unless some constant params appear.  The 10
is probably powi and thus not relevant.  That would leave

> ecosys_mod.F90:       TfuncS = 2.5_r8**(((TEMP + T0_Kelvin) - (Tref +
> T0_Kelvin)) / c10)

can you verify by compiling ecosys_mod.F90 with -O3 instead of -Ofast?
Or add -fno-unsafe-math-optimizations for this file.  Is 'c10' a parameter?

Reply via email to