aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2006-10-15 21:46:26 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2006-10-15 19:46:26 +0000
commitba19ceaeeda23eb90bf8a277eeb9bcdbb78413fa (patch)
tree1902397fabe9819b2a235506aa5e63af0363f012
parent564738dfd1e2f0d3182d811d7abafd9391208ed8 (diff)
downloadgcc-ba19ceaeeda23eb90bf8a277eeb9bcdbb78413fa.zip
gcc-ba19ceaeeda23eb90bf8a277eeb9bcdbb78413fa.tar.gz
gcc-ba19ceaeeda23eb90bf8a277eeb9bcdbb78413fa.tar.bz2
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
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/cgraphunit.c4
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr29241.c15
4 files changed, 29 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 078db2b..2676f32 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2006-10-15 Jan Hubicka <jh@suse.cz>
+
+ 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 <ebotcazou@libertysurf.fr>
John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Andrew Pinski <pinskia@gmail.com>
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index fbe70dd..309fb73 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 8cf1478..33d2825 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2006-10-15 Jan Hubicka <jh@suse.cz>
+
+ PR middle-end/29241
+ * gcc.c-torture/compile/pr29241.c: New testcase.
+
2006-10-15 David Edelsohn <edelsohn@gnu.org>
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 0000000..6db15c1
--- /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();
+}