Commit 1e748a2b by Richard Kenner Committed by Richard Kenner

* gimplify.c (gimplify_one_sizepos): Don't do anything if any VAR_DECL.

From-SVN: r83998
parent 8e6b96d3
2004-07-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 2004-07-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* gimplify.c (gimplify_one_sizepos): Don't do anything if any VAR_DECL.
* tree-pretty-print.c (dump_generic_node, case ARRAY_REF): Use * tree-pretty-print.c (dump_generic_node, case ARRAY_REF): Use
access functions for lower bound and element size and only output access functions for lower bound and element size and only output
if lower bound nonzero or element size not same as that of type. if lower bound nonzero or element size not same as that of type.
......
...@@ -4069,8 +4069,12 @@ void ...@@ -4069,8 +4069,12 @@ void
gimplify_one_sizepos (tree *expr_p, tree *stmt_p) gimplify_one_sizepos (tree *expr_p, tree *stmt_p)
{ {
/* We don't do anything if the value isn't there, is constant, or contains /* 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) if (*expr_p == NULL_TREE || TREE_CONSTANT (*expr_p)
|| TREE_CODE (*expr_p) == VAR_DECL
|| CONTAINS_PLACEHOLDER_P (*expr_p)) || CONTAINS_PLACEHOLDER_P (*expr_p))
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment