This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/48197] possible wrong code bug at -O0
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 26 Mar 2011 09:23:14 +0000
- Subject: [Bug c/48197] possible wrong code bug at -O0
- Auto-submitted: auto-generated
- References: <bug-48197-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48197
--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-26 09:23:03 UTC ---
Author: jakub
Date: Sat Mar 26 09:23:01 2011
New Revision: 171548
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171548
Log:
Backport from mainline
2011-03-20 Jakub Jelinek <jakub@redhat.com>
PR c/42544
PR c/48197
* c-common.c (shorten_compare): If primopN is first sign-extended
to opN and then zero-extended to result type, set primopN to opN.
* gcc.c-torture/execute/pr42544.c: New test.
* gcc.c-torture/execute/pr48197.c: New test.
Added:
branches/gcc-4_6-branch/gcc/testsuite/gcc.c-torture/execute/pr42544.c
branches/gcc-4_6-branch/gcc/testsuite/gcc.c-torture/execute/pr48197.c
Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/c-family/c-common.c
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog