From: Jan Hubicka Date: Sun, 15 Oct 2006 19:46:26 +0000 (+0200) Subject: re PR middle-end/29241 ([non unit-at-a-time] ICE with always inline) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ba19ceaeeda23eb90bf8a277eeb9bcdbb78413fa;p=gcc.git re PR middle-end/29241 ([non unit-at-a-time] ICE with always inline) PR middle-end/29241 * cgraphunit.c (cgraph_preserve_function_body_p): Preserve functions declared always_inline even when not inlining. * gcc.c-torture/compile/pr29241.c: New testcase. From-SVN: r117753 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 078db2bb354..2676f32b6f6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2006-10-15 Jan Hubicka + + PR middle-end/29241 + * cgraphunit.c (cgraph_preserve_function_body_p): Preserve functions + declared always_inline even when not inlining. + 2006-10-15 Eric Botcazou John David Anglin Andrew Pinski diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index fbe70ddc3ce..309fb73f012 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -1494,7 +1494,9 @@ cgraph_preserve_function_body_p (tree decl) { struct cgraph_node *node; if (!cgraph_global_info_ready) - return (DECL_INLINE (decl) && !flag_really_no_inline); + return (flag_really_no_inline + ? lang_hooks.tree_inlining.disregard_inline_limits (decl) + : DECL_INLINE (decl)); /* Look if there is any clone around. */ for (node = cgraph_node (decl); node; node = node->next_clone) if (node->global.inlined_to) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8cf1478c84d..33d2825fc1c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2006-10-15 Jan Hubicka + + PR middle-end/29241 + * gcc.c-torture/compile/pr29241.c: New testcase. + 2006-10-15 David Edelsohn PR middle-end/29250 diff --git a/gcc/testsuite/gcc.c-torture/compile/pr29241.c b/gcc/testsuite/gcc.c-torture/compile/pr29241.c new file mode 100644 index 00000000000..6db15c1c13b --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr29241.c @@ -0,0 +1,15 @@ +static inline __attribute__((always_inline)) void ip_finish_output2(){} +void ip_fragment(void (*)(void)); +static inline __attribute__((always_inline)) void ip_finish_output() +{ + ip_fragment(ip_finish_output2); + ip_finish_output2(); +} +void ip_mc_output() +{ + ip_finish_output(); +} +void ip_output() +{ + ip_finish_output(); +}