Commit 2e3b8fe7 by Eric Botcazou Committed by Eric Botcazou

tree.c (variably_modified_type_p): Return true if the element type is variably…

tree.c (variably_modified_type_p): Return true if the element type is variably modified without recursing.

	* tree.c (variably_modified_type_p) <ARRAY_TYPE>: Return true
	if the element type is variably modified without recursing.

From-SVN: r113858
parent 9cb8f1ba
2006-05-17 Eric Botcazou <ebotcazou@adacore.com>
* tree.c (variably_modified_type_p) <ARRAY_TYPE>: Return true
if the element type is variably modified without recursing.
2006-05-17 Sebastian Pop <pop@cri.ensmp.fr>
PR middle-end/27332
......
......@@ -5635,13 +5635,12 @@ variably_modified_type_p (tree type, tree fn)
When a representation is chosen, this function should be modified
to test for that case as well. */
RETURN_TRUE_IF_VAR (TYPE_SIZE (type));
RETURN_TRUE_IF_VAR (TYPE_SIZE_UNIT(type));
RETURN_TRUE_IF_VAR (TYPE_SIZE_UNIT (type));
switch (TREE_CODE (type))
{
case POINTER_TYPE:
case REFERENCE_TYPE:
case ARRAY_TYPE:
case VECTOR_TYPE:
if (variably_modified_type_p (TREE_TYPE (type), fn))
return true;
......@@ -5690,6 +5689,13 @@ variably_modified_type_p (tree type, tree fn)
}
break;
case ARRAY_TYPE:
/* Do not call ourselves to avoid infinite recursion. This is
variably modified if the element type is. */
RETURN_TRUE_IF_VAR (TYPE_SIZE (TREE_TYPE (type)));
RETURN_TRUE_IF_VAR (TYPE_SIZE_UNIT (TREE_TYPE (type)));
break;
default:
break;
}
......
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