]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-nested.c (check_for_nested_with_variably_modified): Fix typo.
authorEric Botcazou <ebotcazou@adacore.com>
Thu, 29 May 2008 11:36:41 +0000 (11:36 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Thu, 29 May 2008 11:36:41 +0000 (11:36 +0000)
* tree-nested.c (check_for_nested_with_variably_modified): Fix typo.

From-SVN: r136156

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/nested-func-6.c [new file with mode: 0644]
gcc/tree-nested.c

index b1a344694bd7c3fc7e53645db1d72da191746ce7..acb6ecd4b0077b33d8a6b214811d5a6fcf6183b4 100644 (file)
@@ -1,3 +1,7 @@
+2008-05-29  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * tree-nested.c (check_for_nested_with_variably_modified): Fix typo.
+
 2008-05-23  Marius Strobl <marius@FreeBSD.org>
 
        * gthr-posix.h (__gthread_active_p): Use the Solaris implementation
index 5fbc969a70078b290d05093a0ebdc20238306521..b18bb71184a8e6300070a5d92176054c5aa9e397 100644 (file)
@@ -1,3 +1,7 @@
+2008-05-29  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * gcc.dg/nested-func-6.c: New test.
+
 2008-05-20  Adam Nemet  <anemet@caviumnetworks.com>
 
        PR middle-end/36194
diff --git a/gcc/testsuite/gcc.dg/nested-func-6.c b/gcc/testsuite/gcc.dg/nested-func-6.c
new file mode 100644 (file)
index 0000000..3bae4db
--- /dev/null
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O -Winline" } */
+
+static inline int foo1 (int a)
+{                       /* { dg-bogus "function not inlinable" } */
+  void bar1 (int b)
+  {}
+  return a;
+}
+
+int foo2 (int a)
+{
+  return foo1 (a);
+}
index c7c25360a6fba92ae9f8dc9bb558f3c302f8912f..9337423c9395f3a4867e6c57299611feab8803ca 100644 (file)
@@ -749,7 +749,7 @@ check_for_nested_with_variably_modified (tree fndecl, tree orig_fndecl)
   for (cgn = cgn->nested; cgn ; cgn = cgn->next_nested)
     {
       for (arg = DECL_ARGUMENTS (cgn->decl); arg; arg = TREE_CHAIN (arg))
-       if (variably_modified_type_p (TREE_TYPE (arg), 0), orig_fndecl)
+       if (variably_modified_type_p (TREE_TYPE (arg), orig_fndecl))
          return true;
 
       if (check_for_nested_with_variably_modified (cgn->decl, orig_fndecl))