diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2004-07-01 19:45:28 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2004-07-01 15:45:28 -0400 |
commit | 1e748a2b15347a0e5c9fd525218233abd773b46e (patch) | |
tree | 525629489add52675bfec66f2826068c0530d833 /gcc/gimplify.c | |
parent | 8e6b96d398270fe98716792740ac2d50d2a464c4 (diff) | |
download | gcc-1e748a2b15347a0e5c9fd525218233abd773b46e.zip gcc-1e748a2b15347a0e5c9fd525218233abd773b46e.tar.gz gcc-1e748a2b15347a0e5c9fd525218233abd773b46e.tar.bz2 |
* gimplify.c (gimplify_one_sizepos): Don't do anything if any VAR_DECL.
From-SVN: r83998
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index e8fdbe9..ed1af19 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -4069,8 +4069,12 @@ void gimplify_one_sizepos (tree *expr_p, tree *stmt_p) { /* We don't do anything if the value isn't there, is constant, or contains - A PLACEHOLDER_EXPR. */ + A PLACEHOLDER_EXPR. We also don't want to do anything if it's already + a VAR_DECL. If it's a VAR_DECL from another function, the gimplfier + will want to replace it with a new variable, but that will cause problems + if this type is from outside the function. It's OK to have that here. */ if (*expr_p == NULL_TREE || TREE_CONSTANT (*expr_p) + || TREE_CODE (*expr_p) == VAR_DECL || CONTAINS_PLACEHOLDER_P (*expr_p)) return; |