mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-28 16:01:00 +08:00
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
This commit is contained in:
parent
10cbe699ce
commit
96ce2ac9e8
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user