This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/44683] Optimization bug with copysign builtin
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jun 2010 22:57:46 -0000
- Subject: [Bug rtl-optimization/44683] Optimization bug with copysign builtin
- References: <bug-44683-16778@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from rguenth at gcc dot gnu dot org 2010-06-26 22:57 -------
Confirmed. Somewhere during RTL opts we thread a jump the wrong way. Also
happens with SSE math.
int __attribute__((noinline,noclone))
copysign_bug (double x)
{
if (x != 0.0 && (x * 0.5 == x))
return 1;
if (__builtin_copysign(1.0, x) < 0.0)
return 2;
else
return 3;
}
int main(void)
{
double x = -0.0;
if (copysign_bug (x) != 2)
__builtin_abort ();
return 0;
}
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|c |rtl-optimization
Ever Confirmed|0 |1
GCC target triplet|i386-pc-solaris2.11 |i?86-*-*
Keywords| |wrong-code
Known to fail| |4.6.0
Last reconfirmed|0000-00-00 00:00:00 |2010-06-26 22:57:46
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44683