public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: optimization/10774: Problem with ``-march=pentium4 -O''
@ 2003-05-15 13:55 bangerth
  0 siblings, 0 replies; 6+ messages in thread
From: bangerth @ 2003-05-15 13:55 UTC (permalink / raw)
  To: das, gcc-bugs, gcc-prs, mi+gcc, nobody

Synopsis: Problem with ``-march=pentium4 -O''

State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Thu May 15 13:55:55 2003
State-Changed-Why:
    Fixed

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10774


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

* Re: optimization/10774: Problem with ``-march=pentium4 -O''
@ 2003-05-15 14:26 Mikhail Teterin
  0 siblings, 0 replies; 6+ messages in thread
From: Mikhail Teterin @ 2003-05-15 14:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR optimization/10774; it has been noted by GNATS.

From: Mikhail Teterin <mi+kde@aldan.algebra.com>
To: gcc-prs@gcc.gnu.org, das@FreeBSD.org, gcc-bugs@gcc.gnu.org,
   mi+gcc@aldan.algebra.com, gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org
Cc: freebsd-current@FreeBSD.org
Subject: Re: optimization/10774: Problem with ``-march=pentium4 -O''
Date: Thu, 15 May 2003 10:18:10 -0400

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=10774
 
 This was a duplicate of the earlier
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=10189
 
 submitted on my behalf (?) by till@f111.hadiko.de...
 
 The duplicate contained a smaller test-case, however, and, indeed,
 both test-cases generate correct code with the gcc-3.3
 
 	-mi
 


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

* Re: optimization/10774: Problem with ``-march=pentium4 -O''
@ 2003-05-15  3:06 Dara Hazeghi
  0 siblings, 0 replies; 6+ messages in thread
From: Dara Hazeghi @ 2003-05-15  3:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR optimization/10774; it has been noted by GNATS.

From: Dara Hazeghi <dhazeghi@yahoo.com>
To: Mikhail Teterin <mi+kde@aldan.algebra.com>
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: optimization/10774: Problem with ``-march=pentium4 -O''
Date: Wed, 14 May 2003 20:02:59 -0700 (PDT)

 > = By "works," you mean the testcase exhibits the
 > correct behavior?
 > =
 > = Dara
 > 
 > Yes. I also tested the original problem I had --
 > FreeBSD pow(3) was
 > producing incorrect results, when the libm was
 > compiled for P4, which,
 > for me, led to the failure of the lcms (see
 > littlecms.com) selftest.
 > After recompiling the libm with gcc33, I can get
 > through the lcms'
 > selftest. I wonder, if the fixes can be backported
 > to the 3.2.x branch,
 > so the OS vendors can incorporate them without
 > jumping to the 3.3 right
 > away...
 
 They can be backported. However, there is nobody
 maintaining the gcc 3.2 branch, so these fixes will
 probably be localized to the various distributors.
 
 Dara
 
 __________________________________
 Do you Yahoo!?
 The New Yahoo! Search - Faster. Easier. Bingo.
 http://search.yahoo.com


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

* Re: optimization/10774: Problem with ``-march=pentium4 -O''
@ 2003-05-15  1:06 Mikhail Teterin
  0 siblings, 0 replies; 6+ messages in thread
From: Mikhail Teterin @ 2003-05-15  1:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR optimization/10774; it has been noted by GNATS.

From: Mikhail Teterin <Mikhail.Teterin@murex.com>
To: Dara Hazeghi <dhazeghi@yahoo.com>, das@FreeBSD.org,
   mi+gcc@aldan.algebra.com, gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org
Cc: obrien@FreeBSD.org
Subject: Re: optimization/10774: Problem with ``-march=pentium4 -O''
Date: Wed, 14 May 2003 21:03:42 -0400

 On Wednesday 14 May 2003 01:57 pm, Dara Hazeghi wrote:
 = 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10774
 = 
 = Hello,
 = 
 = -march=pentium4 used to have problems. A good number were fixed in    
 = gcc 3.3. Can you by any chance check that the problems still occur    
 = when compiling with gcc 3.3 (I'd help, but don't have access to a     
 = P-IV!)?                                                               
 
 Yes, the
 
 	gcc version 3.3 20030509 (prerelease) [FreeBSD]
 
 and, presumably, the just released (3 hours after I finished building
 the prerelease) gcc-3.3 works too. I hope, FreeBSD updates its compiler
 the soonest -- prior to the 5.1 release... Thanks!
 
 	-mi
 
 
 


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

* Re: optimization/10774: Problem with ``-march=pentium4 -O''
@ 2003-05-14 18:06 Dara Hazeghi
  0 siblings, 0 replies; 6+ messages in thread
From: Dara Hazeghi @ 2003-05-14 18:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR optimization/10774; it has been noted by GNATS.

From: Dara Hazeghi <dhazeghi@yahoo.com>
To: das@FreeBSD.org, mi+gcc@aldan.algebra.com, gcc-gnats@gcc.gnu.org,
   nobody@gcc.gnu.org
Cc:  
Subject: Re: optimization/10774: Problem with ``-march=pentium4 -O''
Date: Wed, 14 May 2003 10:57:48 -0700

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit- 
 trail&database=gcc&pr=10774
 
 Hello,
 
 -march=pentium4 used to have problems. A good number were fixed in gcc  
 3.3. Can you by any chance check that the problems still occur when  
 compiling with gcc 3.3 (I'd help, but don't have access to a P-IV!)?  
 Thanks,
 
 Dara
 


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

* optimization/10774: Problem with ``-march=pentium4 -O''
@ 2003-05-14  0:26 mi+gcc
  0 siblings, 0 replies; 6+ messages in thread
From: mi+gcc @ 2003-05-14  0:26 UTC (permalink / raw)
  To: gcc-gnats; +Cc: das


>Number:         10774
>Category:       optimization
>Synopsis:       Problem with ``-march=pentium4 -O''
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Wed May 14 00:26:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Mikhail Teterin
>Release:        gcc version 3.2.2
>Organization:
>Environment:
Reproduceable with:
	gcc version 3.2.2 [FreeBSD] 20030205 (release)
	gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
>Description:
The attached file (you can remove the ``#include <stdio.h>'' line if you
insist) gets miscompiled with ``-march=pentium4 -O''. Removing the -O
or specifying another architecture (such as pentium3) fixes the problem.

The expected result is 0.5. But an optimized for pentium4 version
produces 5.29463e-315 (same value on both Linux and FreeBSD).
According to the debugger, the 22-nd line is skipped in the P4 case.

See also the FreeBSD problem reports:
	http://www.FreeBSD.org/cgi/query-pr.cgi?pr=bin/43299
	http://www.FreeBSD.org/cgi/query-pr.cgi?pr=i386/51210

	

>How-To-Repeat:
% cc -O1 -march=pentium4 simple_pow.c -Wall && ./a.out
7.000000 ^ 2.100000
7.000000 ^ 2.100000
ax is 5.29463e-315
result is 5.29463e-315
% cc -O1 -march=pentium3 simple_pow.c -Wall && ./a.out
7.000000 ^ 2.100000
7.000000 ^ 2.100000
ax is 0.5
result is 0.5
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-csrc; name="simple_pow.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="simple_pow.c"

I2luY2x1ZGUgPHN0ZGlvLmg+Cgpkb3VibGUgZmFicyhkb3VibGUpOwp0eXBlZGVmIHVuaW9uIHsK
CWRvdWJsZSB2YWx1ZTsKCXN0cnVjdCB7CgkJdW5zaWduZWQgaW50IGxzdzsKCQl1bnNpZ25lZCBp
bnQgbXN3OwoJfSBwYXJ0czsKfSBpZWVlX2RvdWJsZV9zaGFwZV90eXBlOwoKZG91YmxlCmJ1Zyhk
b3VibGUgeCwgZG91YmxlIHksIGludCBpeCkKewoJZG91YmxlIGF4OwoJaWVlZV9kb3VibGVfc2hh
cGVfdHlwZSBzaF91OwoKCXByaW50ZigiJWYgXiAlZlxuIiwgeCwgeSk7CglheCA9IGZhYnMoeCk7
CglwcmludGYoIiVmIF4gJWZcbiIsIGF4LCB5KTsKCglzaF91LnZhbHVlID0gYXg7CglzaF91LnBh
cnRzLm1zdyA9IGl4OwoJYXggPSBzaF91LnZhbHVlOwoKCXByaW50ZigiYXggaXMgJWdcbiIsIGF4
KTsKCglyZXR1cm4gYXg7Cn0KCmludCBtYWluKCkgewoJcHJpbnRmKCJyZXN1bHQgaXMgJWdcbiIs
IGJ1Zyg3LjAsIDIuMSwgMTA3MTY0NDY3MikpOwoJcmV0dXJuIDA7Cn0K


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

end of thread, other threads:[~2003-05-15 14:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-15 13:55 optimization/10774: Problem with ``-march=pentium4 -O'' bangerth
  -- strict thread matches above, loose matches on Subject: below --
2003-05-15 14:26 Mikhail Teterin
2003-05-15  3:06 Dara Hazeghi
2003-05-15  1:06 Mikhail Teterin
2003-05-14 18:06 Dara Hazeghi
2003-05-14  0:26 mi+gcc

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