Commit 96ce2ac9 by James E Wilson Committed by Jim Wilson

Partial fix for too large arrays.

PR tree-optimization/21105
* decl.c (grokdeclarator): Use TYPE_SIZE_UNIT not TYPE_SIZE for
array size check.

From-SVN: r103363
parent 10cbe699
2005-08-22 James E Wilson <wilson@specifix.com>
PR tree-optimization/21105
* decl.c (grokdeclarator): Use TYPE_SIZE_UNIT not TYPE_SIZE for
array size check.
2005-08-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/22233
......
......@@ -7556,8 +7556,8 @@ grokdeclarator (const cp_declarator *declarator,
if (TREE_CODE (type) == ARRAY_TYPE
&& COMPLETE_TYPE_P (type)
&& TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
&& TREE_OVERFLOW (TYPE_SIZE (type)))
&& TREE_CODE (TYPE_SIZE_UNIT (type)) == INTEGER_CST
&& TREE_OVERFLOW (TYPE_SIZE_UNIT (type)))
{
error ("size of array %qs is too large", name);
/* If we proceed with the array type as it is, we'll eventually
......
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