From: Eric Botcazou Date: Thu, 29 May 2008 11:33:17 +0000 (+0000) Subject: tree-nested.c (check_for_nested_with_variably_modified): Fix typo. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4efa7ef95504a0641601f71ef68092ac3d18f9f8;p=gcc.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: r136154 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 72477652d6d..5fb8fddad93 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-29 Richard Guenther PR tree-optimization/36343 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9f77f70634b..1a27c7c3b2d 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-29 Richard Guenther 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 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 ded3c2bf49b..9e3d8ceee1f 100644 --- a/gcc/tree-nested.c +++ b/gcc/tree-nested.c @@ -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))