summaryrefslogtreecommitdiff
path: root/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0181-2011-04-26-Richard-Guenther-rguenther-suse.de.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0181-2011-04-26-Richard-Guenther-rguenther-suse.de.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0181-2011-04-26-Richard-Guenther-rguenther-suse.de.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0181-2011-04-26-Richard-Guenther-rguenther-suse.de.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0181-2011-04-26-Richard-Guenther-rguenther-suse.de.patch
new file mode 100644
index 000000000..78202f0f8
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0181-2011-04-26-Richard-Guenther-rguenther-suse.de.patch
@@ -0,0 +1,58 @@
+From 2e8f32d39576b002280e29079ad6cfc55c852276 Mon Sep 17 00:00:00 2001
+From: rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 26 Apr 2011 12:59:22 +0000
+Subject: [PATCH 181/200] 2011-04-26 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/48731
+ * ipa-inline.c (cgraph_flatten): Test if function is inlinable.
+
+ * gcc.dg/torture/pr48731.c: New testcase.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@172963 138bc75d-0d04-0410-961f-82ee72b054a4
+
+index b3c9215..cbda4be 100644
+--- a/gcc/ipa-inline.c
++++ b/gcc/ipa-inline.c
+@@ -1337,6 +1337,9 @@ cgraph_flatten (struct cgraph_node *node)
+ continue;
+ }
+
++ if (!e->callee->local.inlinable)
++ continue;
++
+ /* We've hit cycle? It is time to give up. */
+ if (e->callee->aux)
+ {
+new file mode 100644
+index 0000000..74b77f6
+--- /dev/null
++++ b/gcc/testsuite/gcc.dg/torture/pr48731.c
+@@ -0,0 +1,24 @@
++/* { dg-do compile } */
++
++#include <stdarg.h>
++
++int blah(int a, ...)
++{
++ va_list va;
++ va_start(va,a);
++ if (a == 0)
++ return -1;
++ else
++ {
++ int i;
++ for (i = 0; i < a; i++)
++ va_arg(va,int);
++ return va_arg(va,int);
++ }
++}
++
++__attribute((flatten))
++int blah2(int b, int c)
++{
++ return blah(2, b, c);
++}
+--
+1.7.0.4
+