public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/43280] New: gcc4.5 -m32 -O2: misoptimizes sha256!
@ 2010-03-07 12:18 edwintorok at gmail dot com
2010-03-07 12:19 ` [Bug tree-optimization/43280] " edwintorok at gmail dot com
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: edwintorok at gmail dot com @ 2010-03-07 12:18 UTC (permalink / raw)
To: gcc-bugs
gcc-4.5 -O2 -m32 misoptimizes sha256:
$ ~/gcc/install/bin/gcc-4.5 sha256.c
-L/home/edwin/gcc/install/lib/gcc/x86_64-unknown-linux-gnu/lib32 -O2 -m32
$ ./a.out
sha256 test vector #1 failed
sha256 test vector #2 failed
sha256 test vector #3 failed
Aborted
Without -m32 it works:
$ ~/gcc/install/bin/gcc-4.5 sha256.c
-L/home/edwin/gcc/install/lib/gcc/x86_64-unknown-linux-gnu/lib64 -O2
$ ./a.out
$
And -m32 -O1 works too:
$ ~/gcc/install/bin/gcc-4.5 sha256.c
-L/home/edwin/gcc/install/lib/gcc/x86_64-unknown-linux-gnu/lib32 -O1 -m32
$ ./a.out
$
gcc version:
~/gcc/install/bin/gcc-4.5 -v
Using built-in specs.
COLLECT_GCC=/home/edwin/gcc/install/bin/gcc-4.5
COLLECT_LTO_WRAPPER=/home/edwin/gcc/install/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --enable-languages=c
--enable-checking=release --enable-ssp --disable-libssp --disable-plugin
--disable-libmudflap --with-system-zlib --enable-version-specific-runtime-libs
--program-suffix=-4.5 --enable-linux-futex -without-system-libunwind
--with-arch-32=i586 --with-tune=generic --with-mpfr=/opt/cfarm/mpfr-2.4.1
--with-gmp=/opt/cfarm/gmp-4.2.4 --with-libelf=/opt/cfarm/libelf-0.8.12
--with-mpc=/opt/cfarm/mpc-0.8 --disable-bootstrap : (reconfigured)
../gcc-trunk/configure --prefix=/home/edwin/gcc/install --enable-languages=c
--enable-checking=release --enable-ssp --disable-libssp --disable-plugin
--disable-libmudflap --with-system-zlib --enable-version-specific-runtime-libs
--program-suffix=-4.5 --enable-linux-futex -without-system-libunwind
--with-arch-32=i586 --with-tune=generic --with-mpfr=/opt/cfarm/mpfr-2.4.1
--with-gmp=/opt/cfarm/gmp-4.2.4 --with-libelf=/opt/cfarm/libelf-0.8.12
--with-mpc=/opt/cfarm/mpc-0.8 --disable-bootstrap
Thread model: posix
gcc version 4.5.0 20100307 (experimental) (GCC)
Bug initially reported against openSUSE 11.3 factory's gcc-4.5, but I
reproduced with upstream gcc-4.5 SVN r157262.
See https://wwws.clamav.net/bugzilla/show_bug.cgi?id=1862 for the original
report.
--
Summary: gcc4.5 -m32 -O2: misoptimizes sha256!
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: edwintorok at gmail dot com
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43280
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/43280] gcc4.5 -m32 -O2: misoptimizes sha256!
2010-03-07 12:18 [Bug tree-optimization/43280] New: gcc4.5 -m32 -O2: misoptimizes sha256! edwintorok at gmail dot com
2010-03-07 12:19 ` [Bug tree-optimization/43280] " edwintorok at gmail dot com
@ 2010-03-07 12:19 ` edwintorok at gmail dot com
2010-03-07 15:47 ` [Bug tree-optimization/43280] [4.5 Regression] " rguenth at gcc dot gnu dot org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: edwintorok at gmail dot com @ 2010-03-07 12:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from edwintorok at gmail dot com 2010-03-07 12:19 -------
Created an attachment (id=20038)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20038&action=view)
sha256.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43280
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/43280] gcc4.5 -m32 -O2: misoptimizes sha256!
2010-03-07 12:18 [Bug tree-optimization/43280] New: gcc4.5 -m32 -O2: misoptimizes sha256! edwintorok at gmail dot com
@ 2010-03-07 12:19 ` edwintorok at gmail dot com
2010-03-07 12:19 ` edwintorok at gmail dot com
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: edwintorok at gmail dot com @ 2010-03-07 12:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from edwintorok at gmail dot com 2010-03-07 12:19 -------
Created an attachment (id=20039)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20039&action=view)
preprocessed sha256.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43280
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/43280] [4.5 Regression] gcc4.5 -m32 -O2: misoptimizes sha256!
2010-03-07 12:18 [Bug tree-optimization/43280] New: gcc4.5 -m32 -O2: misoptimizes sha256! edwintorok at gmail dot com
2010-03-07 12:19 ` [Bug tree-optimization/43280] " edwintorok at gmail dot com
2010-03-07 12:19 ` edwintorok at gmail dot com
@ 2010-03-07 15:47 ` rguenth at gcc dot gnu dot org
2010-03-07 16:56 ` hjl dot tools at gmail dot com
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-03-07 15:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2010-03-07 15:47 -------
Confirmed. This is exposed by the new bswap pass.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |krebbel1 at de dot ibm dot
| |com
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-03-07 15:47:23
date| |
Summary|gcc4.5 -m32 -O2: |[4.5 Regression] gcc4.5 -m32
|misoptimizes sha256! |-O2: misoptimizes sha256!
Target Milestone|--- |4.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43280
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/43280] [4.5 Regression] gcc4.5 -m32 -O2: misoptimizes sha256!
2010-03-07 12:18 [Bug tree-optimization/43280] New: gcc4.5 -m32 -O2: misoptimizes sha256! edwintorok at gmail dot com
` (2 preceding siblings ...)
2010-03-07 15:47 ` [Bug tree-optimization/43280] [4.5 Regression] " rguenth at gcc dot gnu dot org
@ 2010-03-07 16:56 ` hjl dot tools at gmail dot com
2010-03-08 8:54 ` krebbel at gcc dot gnu dot org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-03-07 16:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from hjl dot tools at gmail dot com 2010-03-07 16:56 -------
It is caused by revision 148848:
http://gcc.gnu.org/ml/gcc-cvs/2009-06/msg00831.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43280
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/43280] [4.5 Regression] gcc4.5 -m32 -O2: misoptimizes sha256!
2010-03-07 12:18 [Bug tree-optimization/43280] New: gcc4.5 -m32 -O2: misoptimizes sha256! edwintorok at gmail dot com
` (3 preceding siblings ...)
2010-03-07 16:56 ` hjl dot tools at gmail dot com
@ 2010-03-08 8:54 ` krebbel at gcc dot gnu dot org
2010-03-10 16:28 ` rguenth at gcc dot gnu dot org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: krebbel at gcc dot gnu dot org @ 2010-03-08 8:54 UTC (permalink / raw)
To: gcc-bugs
--
krebbel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |krebbel at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2010-03-07 15:47:23 |2010-03-08 08:54:15
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43280
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/43280] [4.5 Regression] gcc4.5 -m32 -O2: misoptimizes sha256!
2010-03-07 12:18 [Bug tree-optimization/43280] New: gcc4.5 -m32 -O2: misoptimizes sha256! edwintorok at gmail dot com
` (4 preceding siblings ...)
2010-03-08 8:54 ` krebbel at gcc dot gnu dot org
@ 2010-03-10 16:28 ` rguenth at gcc dot gnu dot org
2010-03-10 16:31 ` krebbel at gcc dot gnu dot org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-03-10 16:28 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43280
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/43280] [4.5 Regression] gcc4.5 -m32 -O2: misoptimizes sha256!
2010-03-07 12:18 [Bug tree-optimization/43280] New: gcc4.5 -m32 -O2: misoptimizes sha256! edwintorok at gmail dot com
` (5 preceding siblings ...)
2010-03-10 16:28 ` rguenth at gcc dot gnu dot org
@ 2010-03-10 16:31 ` krebbel at gcc dot gnu dot org
2010-03-10 17:51 ` hjl dot tools at gmail dot com
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: krebbel at gcc dot gnu dot org @ 2010-03-10 16:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from krebbel at gcc dot gnu dot org 2010-03-10 16:31 -------
Created an attachment (id=20074)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20074&action=view)
Experimental patch
This patch fixes the problem for me. Testsuites are still running.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43280
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/43280] [4.5 Regression] gcc4.5 -m32 -O2: misoptimizes sha256!
2010-03-07 12:18 [Bug tree-optimization/43280] New: gcc4.5 -m32 -O2: misoptimizes sha256! edwintorok at gmail dot com
` (6 preceding siblings ...)
2010-03-10 16:31 ` krebbel at gcc dot gnu dot org
@ 2010-03-10 17:51 ` hjl dot tools at gmail dot com
2010-03-11 13:51 ` krebbel at gcc dot gnu dot org
2010-03-11 14:06 ` krebbel at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-03-10 17:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from hjl dot tools at gmail dot com 2010-03-10 17:50 -------
(In reply to comment #5)
> Created an attachment (id=20074)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20074&action=view) [edit]
> Experimental patch
>
> This patch fixes the problem for me. Testsuites are still running.
>
Why does the new testcase have
+/* { dg-require-effective-target lp64 } */
when the failure is shown with -m32 on x86-64?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43280
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/43280] [4.5 Regression] gcc4.5 -m32 -O2: misoptimizes sha256!
2010-03-07 12:18 [Bug tree-optimization/43280] New: gcc4.5 -m32 -O2: misoptimizes sha256! edwintorok at gmail dot com
` (7 preceding siblings ...)
2010-03-10 17:51 ` hjl dot tools at gmail dot com
@ 2010-03-11 13:51 ` krebbel at gcc dot gnu dot org
2010-03-11 14:06 ` krebbel at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: krebbel at gcc dot gnu dot org @ 2010-03-11 13:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from krebbel at gcc dot gnu dot org 2010-03-11 13:51 -------
Subject: Bug 43280
Author: krebbel
Date: Thu Mar 11 13:51:00 2010
New Revision: 157386
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157386
Log:
2010-03-11 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
PR tree-optimization/43280
* tree-ssa-math-opts.c (find_bswap_1): Modify symbolic number
generation.
Move calculation of size out of the if branch.
(find_bswap): Modify compare number generation.
2010-03-11 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* gcc.dg/optimize-bswapdi-1.c: Add OpenSSL bswap variant.
* gcc.dg/pr43280.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/pr43280.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/optimize-bswapdi-1.c
trunk/gcc/tree-ssa-math-opts.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43280
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/43280] [4.5 Regression] gcc4.5 -m32 -O2: misoptimizes sha256!
2010-03-07 12:18 [Bug tree-optimization/43280] New: gcc4.5 -m32 -O2: misoptimizes sha256! edwintorok at gmail dot com
` (8 preceding siblings ...)
2010-03-11 13:51 ` krebbel at gcc dot gnu dot org
@ 2010-03-11 14:06 ` krebbel at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: krebbel at gcc dot gnu dot org @ 2010-03-11 14:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from krebbel at gcc dot gnu dot org 2010-03-11 14:06 -------
(In reply to comment #6)
> Why does the new testcase have
>
> +/* { dg-require-effective-target lp64 } */
>
> when the failure is shown with -m32 on x86-64?
>
I've removed that in the new version. Thanks!
--
krebbel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43280
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2010-03-11 14:06 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-07 12:18 [Bug tree-optimization/43280] New: gcc4.5 -m32 -O2: misoptimizes sha256! edwintorok at gmail dot com
2010-03-07 12:19 ` [Bug tree-optimization/43280] " edwintorok at gmail dot com
2010-03-07 12:19 ` edwintorok at gmail dot com
2010-03-07 15:47 ` [Bug tree-optimization/43280] [4.5 Regression] " rguenth at gcc dot gnu dot org
2010-03-07 16:56 ` hjl dot tools at gmail dot com
2010-03-08 8:54 ` krebbel at gcc dot gnu dot org
2010-03-10 16:28 ` rguenth at gcc dot gnu dot org
2010-03-10 16:31 ` krebbel at gcc dot gnu dot org
2010-03-10 17:51 ` hjl dot tools at gmail dot com
2010-03-11 13:51 ` krebbel at gcc dot gnu dot org
2010-03-11 14:06 ` krebbel at gcc dot gnu dot org
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).