diff options
author | Richard Guenther <rguenther@suse.de> | 2008-01-29 15:47:19 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2008-01-29 15:47:19 +0000 |
commit | 4f5c64b8ace84098b6222b495294765fb3fc38c2 (patch) | |
tree | 7b6cda1d150280c50f4c6d2bbb388db41dc4fa4d /gcc/tree-inline.h | |
parent | 7b3e2d465d6f267d34a18b46c1ab6650c67785d9 (diff) | |
download | gcc-4f5c64b8ace84098b6222b495294765fb3fc38c2.zip gcc-4f5c64b8ace84098b6222b495294765fb3fc38c2.tar.gz gcc-4f5c64b8ace84098b6222b495294765fb3fc38c2.tar.bz2 |
re PR tree-optimization/35006 (Segfault in remove_unused_locals with nested functions)
2008-01-29 Richard Guenther <rguenther@suse.de>
PR middle-end/35006
* tree-inline.h (struct copy_body_data): Add remapping_type_depth
field.
* tree-inline.c (remap_type): Increment remapping_type_depth
around remapping types.
(copy_body_r): Only add referenced variables if they are referenced
from code, not types.
* gcc.c-torture/compile/pr35006.c: New testcase.
From-SVN: r131939
Diffstat (limited to 'gcc/tree-inline.h')
-rw-r--r-- | gcc/tree-inline.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/tree-inline.h b/gcc/tree-inline.h index 893b9c9..562713a 100644 --- a/gcc/tree-inline.h +++ b/gcc/tree-inline.h @@ -95,6 +95,9 @@ typedef struct copy_body_data /* True if this statement will need to be regimplified. */ bool regimplify; + /* > 0 if we are remapping a type currently. */ + int remapping_type_depth; + /* Statements that might be possibly folded. */ struct pointer_set_t *statements_to_fold; |