]> 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:37:53 +0000 (11:37 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Thu, 29 May 2008 11:37:53 +0000 (11:37 +0000)
* tree-nested.c (check_for_nested_with_variably_modified): Fix typo.

From-SVN: r136157

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

index f05e325860a8c602939110362d8b4f7750d72766..edc16a2ec1f59eb5e88dfcdb1781a1d2930d09bf 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-04-08  Richard Guenther  <rguenther@suse.de>
 
        * fold-const.c (fold_widened_comparison): Do not allow
index 900ff9583f2548f4d172f60b389b683e2aab9366..47a7b2c78af6c750c3186f1c22b1204c35094777 100644 (file)
@@ -1,3 +1,7 @@
+2008-05-29  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * gcc.dg/nested-func-6.c: New test.
+
 2008-04-08  Richard Guenther  <rguenther@suse.de>
 
        * gcc.c-torture/execute/20080408-1.c: New testcase.
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 e2d8c5cb658e5300f8809d54f78cc7b6b519924b..0f8049ebf61a606eed9387cdd9fc4a19eed6a471 100644 (file)
@@ -693,7 +693,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))