diff options
author | ktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-06-20 11:49:27 +0000 |
---|---|---|
committer | ktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-06-20 11:49:27 +0000 |
commit | 860651b18763e92af779f0ded12003d160044f9a (patch) | |
tree | dd4bcae7ea7637ba444dd69516cc7a1ce4f2d852 /gcc/testsuite/gcc.dg/binop-notand3.c | |
parent | 0a9aabb7ea3dd92ce3e2f23100e8c8104fbdc2de (diff) | |
download | gcc-860651b18763e92af779f0ded12003d160044f9a.tar.gz |
ChangeLog gcc/
2011-06-20 Kai Tietz <ktietz@redhat.com>
* fold-const.c (fold_binary_loc): Add missing
folding for truth-not operations in combination
with binary and.
ChangeLog gcc/testsuite/
2011-06-20 Kai Tietz <ktietz@redhat.com>
* gcc.dg/binop-notand1.c: New test.
* gcc.dg/binop-notand2.c: New test.
* gcc.dg/binop-notand3.c: New test.
* gcc.dg/binop-notand4.c: New test.
* gcc.dg/binop-notand5.c: New test.
* gcc.dg/binop-notand6.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175206 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/binop-notand3.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/binop-notand3.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/binop-notand3.c b/gcc/testsuite/gcc.dg/binop-notand3.c new file mode 100644 index 00000000000..5f8e32ff8fa --- /dev/null +++ b/gcc/testsuite/gcc.dg/binop-notand3.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-optimized" } */ + +int +foo (int a) +{ + return (!a & 1) != ((a == 0) & 1); +} + +/* { dg-final { scan-tree-dump-times "return 0" 1 "optimized" } } */ +/* { dg-final { cleanup-tree-dump "optimized" } } */ |