[Bug middle-end/43419] gcc replaces pow(x, 0.5) by sqrt(x), invalid when x is -0

vincent at vinc17 dot org gcc-bugzilla@gcc.gnu.org
Thu Mar 18 14:33:00 GMT 2010



------- Comment #1 from vincent at vinc17 dot org  2010-03-18 14:33 -------
If I understand correctly, the bug appears with:

r119248 | rguenth | 2006-11-27 12:38:42 +0100 (Mon, 27 Nov 2006) | 10 lines

2006-11-27  Richard Guenther  <rguenther@suse.de>

        PR middle-end/25620
        * builtins.c (expand_builtin_pow): Optimize non integer valued
        constant exponents using sqrt or cbrt if possible.  Always fall back
        to expanding via optabs.

        * gcc.target/i386/pow-1.c: New testcase.
        * gcc.dg/builtins-58.c: Likewise.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43419



More information about the Gcc-bugs mailing list