public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* target/8213: gmp 4.1 miscompilation on x86-64
@ 2002-10-13 12:46 gbeauchesne
0 siblings, 0 replies; 2+ messages in thread
From: gbeauchesne @ 2002-10-13 12:46 UTC (permalink / raw)
To: gcc-gnats; +Cc: aj, jh
>Number: 8213
>Category: target
>Synopsis: gmp 4.1 miscompilation on x86-64
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Sun Oct 13 12:46:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Gwenole Beauchesne
>Release: GNU C version 3.3 20020916 (experimental)
>Organization:
>Environment:
x86_64-mandrake-linux-gnu
>Description:
gcc-3.2 snapshots older than 2002-10-07 or earlier used to miscompile gmp 4.1 on x86-64. Reproduced with gcc3.3 2002-09-16, though it did not fully bootstrap (comparison failures in stage3) but that's not related.
>How-To-Repeat:
Compile the following testcase with -O2, extracted from <gmp>/mpf/cmp_si.c:
int f(long x, long y)
{
if ((x < 0) == (y < 0))
{
if (x == 0)
return -(y != 0);
if (y == 0)
return x != 0;
}
else
{
return x >= 0 ? 1 : -1;
}
}
int main(void)
{
if (f(-1, 1) != -1)
abort();
return 0;
}
>Fix:
- Add -fno-cse-follow-jumps (Andreas' hint) or lower optimizations to -O1.
- Note that s/long x/int x/ also workarounds the problem.
Does someone know which patch fixed this problem? If so, would someone mind commit it to the regression testsuite?
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: target/8213: gmp 4.1 miscompilation on x86-64
@ 2002-10-29 16:35 hubicka
0 siblings, 0 replies; 2+ messages in thread
From: hubicka @ 2002-10-29 16:35 UTC (permalink / raw)
To: aj, gbeauchesne, gcc-bugs, gcc-prs, hubicka, jh, nobody
Synopsis: gmp 4.1 miscompilation on x86-64
Responsible-Changed-From-To: unassigned->hubicka
Responsible-Changed-By: hubicka
Responsible-Changed-When: Tue Oct 29 16:35:24 2002
Responsible-Changed-Why:
Nasty RTL sharing problem ;(
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8213
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-10-30 0:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-13 12:46 target/8213: gmp 4.1 miscompilation on x86-64 gbeauchesne
2002-10-29 16:35 hubicka
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).