diff options
| -rw-r--r-- | gcc/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/ipa-inline.c | 8 | ||||
| -rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/testsuite/gcc.dg/pr44964.c | 21 |
4 files changed, 39 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a13d96b..e0f8958 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-11-10 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/44964 + * ipa-inline.c (cgraph_flatten): Check that SSA form matches. + 2010-11-10 Martin Jambor <mjambor@suse.cz> PR tree-optimization/46351 diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 0072d61..61fc6b9 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -1407,6 +1407,14 @@ cgraph_flatten (struct cgraph_node *node) continue; } + if (gimple_in_ssa_p (DECL_STRUCT_FUNCTION (node->decl)) + != gimple_in_ssa_p (DECL_STRUCT_FUNCTION (e->callee->decl))) + { + if (dump_file) + fprintf (dump_file, "Not inlining: SSA form does not match.\n"); + continue; + } + /* Inline the edge and flatten the inline clone. Avoid recursing through the original node if the node was cloned. */ if (dump_file) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 31d31d9..92a8509 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-11-10 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/44964 + * gcc.dg/pr44964.c: New testcase. + 2010-11-10 Eric Botcazou <ebotcazou@adacore.com> * gnat.dg/opt10.adb: Fix typo. diff --git a/gcc/testsuite/gcc.dg/pr44964.c b/gcc/testsuite/gcc.dg/pr44964.c new file mode 100644 index 0000000..1df1bde --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr44964.c @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "-fkeep-inline-functions -O" } */ + +static inline __attribute__ ((const)) +void baz (int i) +{ +} + +static __attribute__ ((always_inline)) +inline __attribute__ ((flatten)) +void bar (void) +{ + baz (0); +} + +void +foo (void) +{ + bar (); +} + |
