summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-29 11:37:53 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-29 11:37:53 +0000
commit1570fd3540cb3f650c48eabb5b4dbf1b8340b3af (patch)
treece83e0c5c134de88380f3f123cf8441d3894e4ee /gcc
parent9dd25620630050f15a3e192f8b76d28870a3ad8e (diff)
downloadgcc-1570fd3540cb3f650c48eabb5b4dbf1b8340b3af.tar.gz
* tree-nested.c (check_for_nested_with_variably_modified): Fix typo.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_1-branch@136157 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/nested-func-6.c14
-rw-r--r--gcc/tree-nested.c2
4 files changed, 23 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f05e325860a..edc16a2ec1f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 900ff9583f2..47a7b2c78af 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 00000000000..3bae4db352e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/nested-func-6.c
@@ -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);
+}
diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c
index e2d8c5cb658..0f8049ebf61 100644
--- a/gcc/tree-nested.c
+++ b/gcc/tree-nested.c
@@ -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))