From: Jakub Jelinek Date: Mon, 7 Dec 2015 21:05:51 +0000 (+0100) Subject: re PR tree-optimization/66726 (missed optimization, factor conversion out of COND_EXPR) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0be72a6b4bc5d9de78d03d761ad9fdf0c1fa744d;p=gcc.git re PR tree-optimization/66726 (missed optimization, factor conversion out of COND_EXPR) PR middle-end/66726 * g++.dg/tree-ssa/pr66726.c: Renamed to... * g++.dg/tree-ssa/pr66726.C: ... this. From-SVN: r231384 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9361cee8a70..48cc7aebfae 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2015-12-07 Jakub Jelinek + + PR middle-end/66726 + * g++.dg/tree-ssa/pr66726.c: Renamed to... + * g++.dg/tree-ssa/pr66726.C: ... this. + 2015-12-07 Steve Ellcey * gcc.target/mips/wrap-delay.c: New test. diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr66726.C b/gcc/testsuite/g++.dg/tree-ssa/pr66726.C new file mode 100644 index 00000000000..fb103cd0ad0 --- /dev/null +++ b/gcc/testsuite/g++.dg/tree-ssa/pr66726.C @@ -0,0 +1,35 @@ +/* { dg-do run } */ +/* { dg-options "-O2" } */ + +/* Execution test for converting VIEW_CONVERT_EXPR. */ + +struct cpp_num { + bool f; +}; + +extern cpp_num __attribute__((noinline)) +foo (cpp_num lhs, + cpp_num rhs) +{ + lhs.f = lhs.f || rhs.f; + return lhs; +} + +cpp_num lhs, rhs, r; + +int main () +{ + + lhs.f = false; + rhs.f = false; + r = foo (lhs, rhs); + if (r.f) + __builtin_abort (); + + + lhs.f = false; + rhs.f = true; + r = foo (lhs, rhs); + if (!r.f) + __builtin_abort (); +} diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr66726.c b/gcc/testsuite/g++.dg/tree-ssa/pr66726.c deleted file mode 100644 index 9b3bd8fa9ca..00000000000 --- a/gcc/testsuite/g++.dg/tree-ssa/pr66726.c +++ /dev/null @@ -1,36 +0,0 @@ - -/* { dg-do run } */ -/* { dg-options "-O2" } */ - -/* Execution test for converting VIEW_CONVERT_EXPR. */ - -struct cpp_num { - bool f; -}; - -extern cpp_num __attribute__((noinline)) -foo (cpp_num lhs, - cpp_num rhs) -{ - lhs.f = lhs.f || rhs.f; - return lhs; -} - -cpp_num lhs, rhs, r; - -int main () -{ - - lhs.f = false; - rhs.f = false; - r = foo (lhs, rhs); - if (r.f) - __builtin_abort (); - - - lhs.f = false; - rhs.f = true; - r = foo (lhs, rhs); - if (!r.f) - __builtin_abort (); -}