From: Eric Botcazou Date: Thu, 29 May 2008 11:37:53 +0000 (+0000) Subject: tree-nested.c (check_for_nested_with_variably_modified): Fix typo. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3999e83f57b5a24387a04946376f6b44a182c13f;p=thirdparty%2Fgcc.git tree-nested.c (check_for_nested_with_variably_modified): Fix typo. * tree-nested.c (check_for_nested_with_variably_modified): Fix typo. From-SVN: r136157 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f05e325860a8..edc16a2ec1f5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2008-05-29 Eric Botcazou + + * tree-nested.c (check_for_nested_with_variably_modified): Fix typo. + 2008-04-08 Richard Guenther * fold-const.c (fold_widened_comparison): Do not allow diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 900ff9583f25..47a7b2c78af6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2008-05-29 Eric Botcazou + + * gcc.dg/nested-func-6.c: New test. + 2008-04-08 Richard Guenther * 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 000000000000..3bae4db352e7 --- /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 e2d8c5cb658e..0f8049ebf61a 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))