public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/57860] New: wrong code for bitwise ops with long long literal on x86_64-linux (32-bit mode)
@ 2013-07-09 8:20 su at cs dot ucdavis.edu
2013-07-10 13:06 ` [Bug tree-optimization/57860] " mikpe at it dot uu.se
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: su at cs dot ucdavis.edu @ 2013-07-09 8:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57860
Bug ID: 57860
Summary: wrong code for bitwise ops with long long literal on
x86_64-linux (32-bit mode)
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: su at cs dot ucdavis.edu
The current gcc trunk mis-compiles the following code on x86_64-linux at -O2
and -O3 in 32-bit mode. This is a regression from 4.8.x.
$ gcc-trunk -v
gcc version 4.9.0 20130708 (experimental) [trunk revision 200751] (GCC)
$ gcc-trunk -m32 -O2 reduced.c
$ a.out
0
$ gcc-trunk -m32 -O3 reduced.c
$ a.out
0
$ gcc-trunk -m32 -O0 reduced.c
$ a.out
1
$ gcc-4.8 -m32 -O2 reduced.c
$ a.out
1
$
--------------------------------------------
int printf (const char *, ...);
int a, *b = &a, c, d, e, *f = &e, g, *h = &d, k[1] = {1};
int
foo (int p)
{
for (;; g++)
{
for (; c; c--);
*f = *h = p > ((0x1FFFFFFFFLL ^ a) & *b);
if (k[g])
return 0;
}
}
int
main ()
{
foo (1);
printf ("%d\n", d);
return 0;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/57860] wrong code for bitwise ops with long long literal on x86_64-linux (32-bit mode)
2013-07-09 8:20 [Bug tree-optimization/57860] New: wrong code for bitwise ops with long long literal on x86_64-linux (32-bit mode) su at cs dot ucdavis.edu
@ 2013-07-10 13:06 ` mikpe at it dot uu.se
2013-08-27 9:17 ` jakub at gcc dot gnu.org
2013-08-27 9:27 ` [Bug rtl-optimization/57860] " jakub at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: mikpe at it dot uu.se @ 2013-07-10 13:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57860
Mikael Pettersson <mikpe at it dot uu.se> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vmakarov at gcc dot gnu.org
--- Comment #1 from Mikael Pettersson <mikpe at it dot uu.se> ---
Caused by the LRA changes in r200723. Author CCd.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/57860] wrong code for bitwise ops with long long literal on x86_64-linux (32-bit mode)
2013-07-09 8:20 [Bug tree-optimization/57860] New: wrong code for bitwise ops with long long literal on x86_64-linux (32-bit mode) su at cs dot ucdavis.edu
2013-07-10 13:06 ` [Bug tree-optimization/57860] " mikpe at it dot uu.se
@ 2013-08-27 9:17 ` jakub at gcc dot gnu.org
2013-08-27 9:27 ` [Bug rtl-optimization/57860] " jakub at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-08-27 9:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57860
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |jakub at gcc dot gnu.org
Resolution|--- |FIXED
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This was introduced with r200723 and got fixed in r200899.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug rtl-optimization/57860] wrong code for bitwise ops with long long literal on x86_64-linux (32-bit mode)
2013-07-09 8:20 [Bug tree-optimization/57860] New: wrong code for bitwise ops with long long literal on x86_64-linux (32-bit mode) su at cs dot ucdavis.edu
2013-07-10 13:06 ` [Bug tree-optimization/57860] " mikpe at it dot uu.se
2013-08-27 9:17 ` jakub at gcc dot gnu.org
@ 2013-08-27 9:27 ` jakub at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-08-27 9:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57860
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue Aug 27 09:24:52 2013
New Revision: 202018
URL: http://gcc.gnu.org/viewcvs?rev=202018&root=gcc&view=rev
Log:
PR rtl-optimization/57860
PR rtl-optimization/57861
PR rtl-optimization/57875
PR rtl-optimization/57876
PR rtl-optimization/57877
* gcc.c-torture/execute/pr57860.c: New test.
* gcc.c-torture/execute/pr57861.c: New test.
* gcc.c-torture/execute/pr57875.c: New test.
* gcc.c-torture/execute/pr57876.c: New test.
* gcc.c-torture/execute/pr57877.c: New test.
Added:
trunk/gcc/testsuite/gcc.c-torture/execute/pr57860.c
trunk/gcc/testsuite/gcc.c-torture/execute/pr57861.c
trunk/gcc/testsuite/gcc.c-torture/execute/pr57875.c
trunk/gcc/testsuite/gcc.c-torture/execute/pr57876.c
trunk/gcc/testsuite/gcc.c-torture/execute/pr57877.c
Modified:
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-08-27 9:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-09 8:20 [Bug tree-optimization/57860] New: wrong code for bitwise ops with long long literal on x86_64-linux (32-bit mode) su at cs dot ucdavis.edu
2013-07-10 13:06 ` [Bug tree-optimization/57860] " mikpe at it dot uu.se
2013-08-27 9:17 ` jakub at gcc dot gnu.org
2013-08-27 9:27 ` [Bug rtl-optimization/57860] " jakub at gcc dot gnu.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).