public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/43419] gcc replaces pow(x, 0.5) by sqrt(x), invalid when x is -0
       [not found] <bug-43419-4@http.gcc.gnu.org/bugzilla/>
@ 2014-02-16 13:18 ` jackie.rosen at hushmail dot com
  0 siblings, 0 replies; 11+ messages in thread
From: jackie.rosen at hushmail dot com @ 2014-02-16 13:18 UTC (permalink / raw)
  To: gcc-bugs

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

Jackie Rosen <jackie.rosen at hushmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jackie.rosen at hushmail dot com

--- Comment #10 from Jackie Rosen <jackie.rosen at hushmail dot com> ---
*** Bug 260998 has been marked as a duplicate of this bug. ***
Seen from the domain http://volichat.com
Page where seen: http://volichat.com/adult-chat-rooms
Marked for reference. Resolved as fixed @bugzilla.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug middle-end/43419] gcc replaces pow(x, 0.5) by sqrt(x), invalid when x is -0
  2010-03-18 14:08 [Bug middle-end/43419] New: " vincent at vinc17 dot org
                   ` (8 preceding siblings ...)
  2010-03-22 16:02 ` mikpe at it dot uu dot se
@ 2010-03-25 16:18 ` hjl dot tools at gmail dot com
  9 siblings, 0 replies; 11+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-03-25 16:18 UTC (permalink / raw)
  To: gcc-bugs



-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |4.3.4
      Known to work|                            |4.4.4 4.5.0
   Target Milestone|---                         |4.5.0
            Version|unknown                     |4.5.0


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug middle-end/43419] gcc replaces pow(x, 0.5) by sqrt(x), invalid when x is -0
  2010-03-18 14:08 [Bug middle-end/43419] New: " vincent at vinc17 dot org
                   ` (7 preceding siblings ...)
  2010-03-22 14:58 ` jakub at gcc dot gnu dot org
@ 2010-03-22 16:02 ` mikpe at it dot uu dot se
  2010-03-25 16:18 ` hjl dot tools at gmail dot com
  9 siblings, 0 replies; 11+ messages in thread
From: mikpe at it dot uu dot se @ 2010-03-22 16:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from mikpe at it dot uu dot se  2010-03-22 16:02 -------
This bug also affects 4.3 branch. The upstream patch applies Ok and fixes it.


-- 


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug middle-end/43419] gcc replaces pow(x, 0.5) by sqrt(x), invalid when x is -0
  2010-03-18 14:08 [Bug middle-end/43419] New: " vincent at vinc17 dot org
                   ` (6 preceding siblings ...)
  2010-03-18 16:48 ` matz at gcc dot gnu dot org
@ 2010-03-22 14:58 ` jakub at gcc dot gnu dot org
  2010-03-22 16:02 ` mikpe at it dot uu dot se
  2010-03-25 16:18 ` hjl dot tools at gmail dot com
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-03-22 14:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jakub at gcc dot gnu dot org  2010-03-22 14:58 -------
Subject: Bug 43419

Author: jakub
Date: Mon Mar 22 14:58:00 2010
New Revision: 157631

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157631
Log:
        Backport from mainline:
        2010-03-18  Michael Matz  <matz@suse.de>

        PR middle-end/43419
        * builtins.c (expand_builtin_pow): Don't transform pow(x, 0.5)
        into sqrt(x) if we need to preserve signed zeros.

        * gcc.dg/pr43419.c: New testcase.

Added:
    branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/pr43419.c
Modified:
    branches/gcc-4_4-branch/gcc/ChangeLog
    branches/gcc-4_4-branch/gcc/builtins.c
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog


-- 


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug middle-end/43419] gcc replaces pow(x, 0.5) by sqrt(x), invalid when x is -0
  2010-03-18 14:08 [Bug middle-end/43419] New: " vincent at vinc17 dot org
                   ` (5 preceding siblings ...)
  2010-03-18 16:08 ` matz at gcc dot gnu dot org
@ 2010-03-18 16:48 ` matz at gcc dot gnu dot org
  2010-03-22 14:58 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: matz at gcc dot gnu dot org @ 2010-03-18 16:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from matz at gcc dot gnu dot org  2010-03-18 16:47 -------
Fixed.


-- 

matz at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug middle-end/43419] gcc replaces pow(x, 0.5) by sqrt(x), invalid when x is -0
  2010-03-18 14:08 [Bug middle-end/43419] New: " vincent at vinc17 dot org
                   ` (4 preceding siblings ...)
  2010-03-18 15:31 ` rguenth at gcc dot gnu dot org
@ 2010-03-18 16:08 ` matz at gcc dot gnu dot org
  2010-03-18 16:48 ` matz at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: matz at gcc dot gnu dot org @ 2010-03-18 16:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from matz at gcc dot gnu dot org  2010-03-18 16:08 -------
Subject: Bug 43419

Author: matz
Date: Thu Mar 18 16:07:53 2010
New Revision: 157543

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157543
Log:
        PR middle-end/43419
        * builtins.c (expand_builtin_pow): Don't transform pow(x, 0.5)
        into sqrt(x) if we need to preserve signed zeros.

testsuite/
        * gcc.dg/pr43419.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/pr43419.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/builtins.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug middle-end/43419] gcc replaces pow(x, 0.5) by sqrt(x), invalid when x is -0
  2010-03-18 14:08 [Bug middle-end/43419] New: " vincent at vinc17 dot org
                   ` (3 preceding siblings ...)
  2010-03-18 14:49 ` matz at gcc dot gnu dot org
@ 2010-03-18 15:31 ` rguenth at gcc dot gnu dot org
  2010-03-18 16:08 ` matz at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-03-18 15:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2010-03-18 15:31 -------
Looks like we need to guard this with HONOR_SIGNED_ZEROS.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug middle-end/43419] gcc replaces pow(x, 0.5) by sqrt(x), invalid when x is -0
  2010-03-18 14:08 [Bug middle-end/43419] New: " vincent at vinc17 dot org
                   ` (2 preceding siblings ...)
  2010-03-18 14:42 ` dominiq at lps dot ens dot fr
@ 2010-03-18 14:49 ` matz at gcc dot gnu dot org
  2010-03-18 15:31 ` rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: matz at gcc dot gnu dot org @ 2010-03-18 14:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from matz at gcc dot gnu dot org  2010-03-18 14:48 -------
I checked, and these and similar transformations are always guarded by
flag_unsafe_math_optimizations, so we should be fine, unless I missed a case
of course.  If you notice one, please create a bug report.


-- 


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug middle-end/43419] gcc replaces pow(x, 0.5) by sqrt(x), invalid when x is -0
  2010-03-18 14:08 [Bug middle-end/43419] New: " vincent at vinc17 dot org
  2010-03-18 14:33 ` [Bug middle-end/43419] " vincent at vinc17 dot org
  2010-03-18 14:35 ` matz at gcc dot gnu dot org
@ 2010-03-18 14:42 ` dominiq at lps dot ens dot fr
  2010-03-18 14:49 ` matz at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dominiq at lps dot ens dot fr @ 2010-03-18 14:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from dominiq at lps dot ens dot fr  2010-03-18 14:41 -------
While you are looking at this part, you may have to check that a similar
problem does not exist when converting x*sqrt(x) to pow(w,1.5) and so on.


-- 


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug middle-end/43419] gcc replaces pow(x, 0.5) by sqrt(x), invalid when x is -0
  2010-03-18 14:08 [Bug middle-end/43419] New: " vincent at vinc17 dot org
  2010-03-18 14:33 ` [Bug middle-end/43419] " vincent at vinc17 dot org
@ 2010-03-18 14:35 ` matz at gcc dot gnu dot org
  2010-03-18 14:42 ` dominiq at lps dot ens dot fr
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: matz at gcc dot gnu dot org @ 2010-03-18 14:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from matz at gcc dot gnu dot org  2010-03-18 14:35 -------
Mine.


-- 

matz at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |matz at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-03-18 14:35:38
               date|                            |


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug middle-end/43419] gcc replaces pow(x, 0.5) by sqrt(x), invalid when x is -0
  2010-03-18 14:08 [Bug middle-end/43419] New: " vincent at vinc17 dot org
@ 2010-03-18 14:33 ` vincent at vinc17 dot org
  2010-03-18 14:35 ` matz at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: vincent at vinc17 dot org @ 2010-03-18 14:33 UTC (permalink / raw)
  To: gcc-bugs



------- 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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-02-16 13:18 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-43419-4@http.gcc.gnu.org/bugzilla/>
2014-02-16 13:18 ` [Bug middle-end/43419] gcc replaces pow(x, 0.5) by sqrt(x), invalid when x is -0 jackie.rosen at hushmail dot com
2010-03-18 14:08 [Bug middle-end/43419] New: " vincent at vinc17 dot org
2010-03-18 14:33 ` [Bug middle-end/43419] " vincent at vinc17 dot org
2010-03-18 14:35 ` matz at gcc dot gnu dot org
2010-03-18 14:42 ` dominiq at lps dot ens dot fr
2010-03-18 14:49 ` matz at gcc dot gnu dot org
2010-03-18 15:31 ` rguenth at gcc dot gnu dot org
2010-03-18 16:08 ` matz at gcc dot gnu dot org
2010-03-18 16:48 ` matz at gcc dot gnu dot org
2010-03-22 14:58 ` jakub at gcc dot gnu dot org
2010-03-22 16:02 ` mikpe at it dot uu dot se
2010-03-25 16:18 ` hjl dot tools at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).