tree-nested.c (check_for_nested_with_variably_modified): Fix typo.
authorEric Botcazou <ebotcazou@adacore.com>
Thu, 29 May 2008 11:33:17 +0000 (11:33 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Thu, 29 May 2008 11:33:17 +0000 (11:33 +0000)
* tree-nested.c (check_for_nested_with_variably_modified): Fix typo.

From-SVN: r136154

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

index 72477652d6d08bd305fad7f7332d128f09780069..5fb8fddad931dc51dcec0de542b987fb3bc93c17 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-29  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/36343
index 9f77f70634b9ed9102f56d5e040e347519574efc..1a27c7c3b2d0b2b6d4fb53a6ab4587903a8dc91f 100644 (file)
@@ -1,3 +1,7 @@
+2008-05-29  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * gcc.dg/nested-func-6.c: New test.
+
 2008-05-29  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/36343
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 ded3c2bf49b5a4d48a1e5e027e9f88f2e942b586..9e3d8ceee1f7a026b23624b00f92703df5663f78 100644 (file)
@@ -770,7 +770,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))