PR c/42544
commit119d06b228068b4395b4e42f727524c6bd922834
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Mar 2011 17:57:34 +0000 (21 17:57 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Mar 2011 17:57:34 +0000 (21 17:57 +0000)
treea599d6407fcac6fa3c455a61f9abe5fc1d927338
parentcac9dbbdd01774198844491214ffe1fc93688d6e
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171252 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/c-family/c-common.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr42544.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/pr48197.c [new file with mode: 0644]