diff mbox

Fix another fallout of partial inlining change

Message ID 35349363.tiXNrEcsXg@polaris
State New
Headers show

Commit Message

Eric Botcazou Sept. 6, 2013, 9:08 a.m. UTC
Hi,

see http://gcc.gnu.org/ml/gcc/2013-09/msg00028.html for the context.
The patch sets DECL_NO_INLINE_WARNING_P on the non-inlinable part after 
splitting (an alternative would be to clear DECL_DECLARED_INLINE_P).

Tested on x86_64-suse-linux, OK for the mainline?


2013-09-06  Eric Botcazou  <ebotcazou@adacore.com>

	* ipa-split.c (split_function): Set DECL_NO_INLINE_WARNING_P on the
	non-inlinable part.



2013-09-06  Eric Botcazou  <ebotcazou@adacore.com>

	* gnat.dg/warn10.ad[sb]: New test.
	* gnat.dg/warn10_pkg.ads: New helper.
diff mbox

Patch

Index: ipa-split.c
===================================================================
--- ipa-split.c	(revision 202287)
+++ ipa-split.c	(working copy)
@@ -1222,6 +1222,9 @@  split_function (struct split_point *spli
       DECL_BUILT_IN_CLASS (node->symbol.decl) = NOT_BUILT_IN;
       DECL_FUNCTION_CODE (node->symbol.decl) = (enum built_in_function) 0;
     }
+  /* If the original function is declared inline, there is no point in issuing
+     a warning for the non-inlinable part.  */
+  DECL_NO_INLINE_WARNING_P (node->symbol.decl) = 1;
   cgraph_node_remove_callees (cur_node);
   ipa_remove_all_references (&cur_node->symbol.ref_list);
   if (!split_part_return_p)