From c4e5fe4b51a5228f734ddf76e680dd9088d59a55 Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Tue, 13 Oct 2009 13:31:08 +0200 Subject: re PR tree-optimization/41661 (ICE due to IPCP trying to create/fold a REAL typed comparision) 2009-10-13 Martin Jambor PR tree-optimization/41661 * ipa-prop.c (compute_complex_pass_through): Allow only operations that are tcc_comparisons or do not change the type in any un-usleless way. * ipa-cp.c (ipcp_lattice_from_jfunc): Request boolean type when folding tcc_comparison operations. * testsuite/gcc.c-torture/compile/pr41661.c: New test. From-SVN: r152702 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.c-torture/compile/pr41661.c | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr41661.c (limited to 'gcc/testsuite') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2303589..8e53af9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2009-10-13 Martin Jambor + + * gcc.c-torture/compile/pr41661.c: New test. + 2009-10-12 Jerry DeLisle PR libgfortran/41683 diff --git a/gcc/testsuite/gcc.c-torture/compile/pr41661.c b/gcc/testsuite/gcc.c-torture/compile/pr41661.c new file mode 100644 index 0000000..658e428 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr41661.c @@ -0,0 +1,20 @@ +/* PR tree-optimization/41661 */ +/* { dg-do compile } */ +/* { dg-options "-fno-early-inlining" } */ + +int g; + +void foo (int x) +{ + g = x; +} + +void bar (double d) +{ + foo (d == 1); +} + +void baz (int a) +{ + bar (1); +} -- cgit v1.1