summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-06 09:35:23 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-06 09:35:23 +0000
commitea03e543c51716b7e3e868ca8c54f308cdf59fd5 (patch)
tree8121b896402c877769568030f5397dcc4147e6bf
parent79294c79d2c164b42a76f3f52fc8ad7c70857e6a (diff)
downloadgcc-ea03e543c51716b7e3e868ca8c54f308cdf59fd5.tar.gz
* ipa-split.c (split_function): Set DECL_NO_INLINE_WARNING_P on the
non-inlinable part. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202315 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/ipa-split.c3
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gnat.dg/warn10.adb12
-rw-r--r--gcc/testsuite/gnat.dg/warn10.ads11
-rw-r--r--gcc/testsuite/gnat.dg/warn10_pkg.ads12
6 files changed, 48 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 185c8655b94..e5b74ed8af7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+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 Richard Biener <rguenther@suse.de>
* lto-streamer.h (lto_global_var_decls): Remove.
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c
index 5c3ee4fa2ce..5df14ecb703 100644
--- a/gcc/ipa-split.c
+++ b/gcc/ipa-split.c
@@ -1222,6 +1222,9 @@ split_function (struct split_point *split_point)
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)
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 96a5b6a1dd6..e3ad4be7d47 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2013-09-06 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/warn10.ad[sb]: New test.
+ * gnat.dg/warn10_pkg.ads: New helper.
+
2013-09-06 Joern Rennecke <joern.rennecke@embecosm.com>
* gcc.dg/ipa/ipa-pta-14.c (scan-ipa-dump) [keeps_null_pointer_checks]:
diff --git a/gcc/testsuite/gnat.dg/warn10.adb b/gcc/testsuite/gnat.dg/warn10.adb
new file mode 100644
index 00000000000..29b140d7598
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/warn10.adb
@@ -0,0 +1,12 @@
+-- { dg-do compile }
+-- { dg-options "-O3 -gnatn -Winline" }
+
+package body Warn10 is
+
+ procedure Do_Something(Driver : My_Driver) is
+ X : Float;
+ begin
+ X := Get_Input_Value( Driver, 1, 1);
+ end;
+
+end Warn10;
diff --git a/gcc/testsuite/gnat.dg/warn10.ads b/gcc/testsuite/gnat.dg/warn10.ads
new file mode 100644
index 00000000000..01aa1e4b58a
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/warn10.ads
@@ -0,0 +1,11 @@
+with Warn10_Pkg; use Warn10_Pkg;
+
+package Warn10 is
+
+ type My_Driver is new Root with record
+ Extra : Natural;
+ end record;
+
+ procedure Do_Something(Driver : My_Driver);
+
+end Warn10;
diff --git a/gcc/testsuite/gnat.dg/warn10_pkg.ads b/gcc/testsuite/gnat.dg/warn10_pkg.ads
new file mode 100644
index 00000000000..ac5b676777d
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/warn10_pkg.ads
@@ -0,0 +1,12 @@
+package Warn10_Pkg is
+
+ Size : constant Natural := 100;
+ type My_Array is array(1..Size, 1..Size) of Float;
+
+ type Root is tagged record
+ Input_Values : My_Array;
+ end record;
+
+ function Get_Input_Value( Driver : Root; I, J : Natural) return Float;
+
+end Warn10_Pkg;