From: Eric Botcazou Date: Thu, 29 May 2008 11:36:41 +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=aab95a1228e286b631ba29c0a684e1fb05ad380c;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: r136156 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b1a344694bd7..acb6ecd4b007 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-05-23 Marius Strobl * gthr-posix.h (__gthread_active_p): Use the Solaris implementation diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5fbc969a7007..b18bb71184a8 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-05-20 Adam Nemet 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 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 c7c25360a6fb..9337423c9395 100644 --- a/gcc/tree-nested.c +++ b/gcc/tree-nested.c @@ -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))