diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/nested-func-6.c | 14 | ||||
-rw-r--r-- | gcc/tree-nested.c | 2 |
4 files changed, 23 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7247765..5fb8fdd 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-05-29 Richard Guenther <rguenther@suse.de> PR tree-optimization/36343 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9f77f70..1a27c7c 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-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 index 0000000..3bae4db --- /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 ded3c2b..9e3d8ce 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)) |