[Bug tree-optimization/38478] [4.3 Regression] incorrect results for polynomial evaluation with optimisation/inline functions
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Dec 10 18:37:00 GMT 2008
------- Comment #3 from rguenth at gcc dot gnu dot org 2008-12-10 18:35 -------
This looks the same as PR37868 (or more specifically it matches PR38048, a dup
of that). Indeed, on the branch with -O2 it works. But it seems to be still
broken with -O --param max-fields-for-field-sensitive=100 (but we shouldn't
care too much about that - this setting may be broken anyway).
optimized dump difference reveals that we remove initializations over-eagerly:
<bb 2>:
- c[0] = 1.0e+0;
- c[1] = 5.0e-1;
- c[2] = 2.99999999999999988897769753748434595763683319092e-1;
- D.3671 = (c[1] + 1.49999999999999994448884876874217297881841659546e-1) *
5.0e
-1;
- gsl_test_rel (c[0] + D.3671,
1.3249999999999999555910790149937383830547332763
7e+0, 2.220446049250313080847263336181640625e-14, &"gsl_poly_eval({1, 0.5,
0.3},
0.5)"[0]);
+ D.3656 = (c[1] + 1.49999999999999994448884876874217297881841659546e-1) *
5.0e-1;
+ gsl_test_rel (c[0] + D.3656,
1.32499999999999995559107901499373838305473327637e+0,
2.220446049250313080847263336181640625e-14, &"gsl_poly_eval({1, 0.5, 0.3},
0.5)"[0]);
so, this may be related to PR38051 / PR38169. I'm checking the backport
I have around. Yup, that fixes it fully. Mine.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-12-10 18:35:39
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38478
More information about the Gcc-bugs
mailing list