[Bug middle-end/33794] [4.3 regression] Wrong code w/ -ffast-math

2007-10-17 Thread ubizjak at gmail dot com
--- Comment #16 from ubizjak at gmail dot com 2007-10-17 17:11 --- Fixed. -- ubizjak at gmail dot com changed: What|Removed |Added Status|ASSIGNED

[Bug middle-end/33794] [4.3 regression] Wrong code w/ -ffast-math

2007-10-17 Thread ubizjak at gmail dot com
--- Comment #11 from ubizjak at gmail dot com 2007-10-17 12:39 --- The problem is somewhere around line 212 in induct.f90. Adding some debug code at the end of the function: ... !evaluate self-inductance ! self_l = (mu * turns**2 * l**2 * 2.0_longreal * r)/3.0_longreal *

[Bug middle-end/33794] [4.3 regression] Wrong code w/ -ffast-math

2007-10-17 Thread ubizjak at gmail dot com
--- Comment #10 from ubizjak at gmail dot com 2007-10-17 12:28 --- (In reply to comment #9) I don't want to claim excess precision problems here. I was trying to debug self_ind_cir_coil procedure, as it looks that the problem is in calculation of self_r output. The input to this proced

[Bug middle-end/33794] [4.3 regression] Wrong code w/ -ffast-math

2007-10-17 Thread pinskia at gcc dot gnu dot org
--- Comment #9 from pinskia at gcc dot gnu dot org 2007-10-17 11:46 --- I think what is happening is that "coil_coil_mutuals[0] / D.6241" is being expanded as coil_coil_mutuals[0] * (1/D.6241) which is not bad, just inconstaint. I think we need to look into this more but I doubt there i

[Bug middle-end/33794] [4.3 regression] Wrong code w/ -ffast-math

2007-10-17 Thread ubizjak at gmail dot com
--- Comment #8 from ubizjak at gmail dot com 2007-10-17 11:40 --- (In reply to comment #6) > Also what happens if you use -ffloat-store ? -O2 -ffast-math -ffloat-store works OK... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33794

[Bug middle-end/33794] [4.3 regression] Wrong code w/ -ffast-math

2007-10-17 Thread ubizjak at gmail dot com
--- Comment #7 from ubizjak at gmail dot com 2007-10-17 11:38 --- (In reply to comment #5) There are (many!) changes of type: - D.6241 = __builtin_sqrt (receive_coil_1.self_ind * transmit_coil.self_ind); - coil_coil_mutuals[0] = coil_coil_mutuals[0] / D.6241; + coil_coil_mutuals[0]

[Bug middle-end/33794] [4.3 regression] Wrong code w/ -ffast-math

2007-10-17 Thread pinskia at gcc dot gnu dot org
--- Comment #6 from pinskia at gcc dot gnu dot org 2007-10-17 11:02 --- Also what happens if you use -ffloat-store ? Even though it might be 3 orders of magnitude, this could be still the same issue as PR 323 (errors multiply in some cases). Also note -ffloat-store disables TER for flo

[Bug middle-end/33794] [4.3 regression] Wrong code w/ -ffast-math

2007-10-17 Thread pinskia at gcc dot gnu dot org
--- Comment #5 from pinskia at gcc dot gnu dot org 2007-10-17 10:39 --- And really that patch should not change anything really since it just means TER does not cross function call boundaries now (and not just accross over non pure/const function calls). Can you at least give the final_

[Bug middle-end/33794] [4.3 regression] Wrong code w/ -ffast-math

2007-10-17 Thread ubizjak at gmail dot com
--- Comment #4 from ubizjak at gmail dot com 2007-10-17 10:23 --- Bisection points to r129350: http://gcc.gnu.org/viewcvs?view=rev&revision=129350 PR tree-optimization/33619 * tree-ssa-ter.c (is_replaceable_p): Return false for all calls. * gcc.dg/pr3361

[Bug middle-end/33794] [4.3 regression] Wrong code w/ -ffast-math

2007-10-17 Thread ubizjak at gmail dot com
--- Comment #3 from ubizjak at gmail dot com 2007-10-17 09:11 --- Confirmed with plain -O2 -ffast-math on i686-pc-linux-gnu. -- ubizjak at gmail dot com changed: What|Removed |Added --