re PR ada/23427 (latent bug with array type size check)
2005-11-03 James E Wilson <wilson@specifix.com> PR ada/23427 * trans.c (gnat_to_gnu): Use TYPE_SIZE_UNIT not TYPE_SIZE in TREE_OVERFLOW check. From-SVN: r106452
This commit is contained in:
parent
f2bd1eb944
commit
720981287a
2 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2005-11-03 James E Wilson <wilson@specifix.com>
|
||||
|
||||
PR ada/23427
|
||||
* trans.c (gnat_to_gnu): Use TYPE_SIZE_UNIT not TYPE_SIZE in
|
||||
TREE_OVERFLOW check.
|
||||
|
||||
2005-09-21 Olivier Hainque <hainque@adacore.com>
|
||||
|
||||
PR ada/22418
|
||||
|
|
|
@ -3423,8 +3423,8 @@ gnat_to_gnu (Node_Id gnat_node)
|
|||
|
||||
/* If the type has a size that overflows, convert this into raise of
|
||||
Storage_Error: execution shouldn't have gotten here anyway. */
|
||||
if (TREE_CODE (TYPE_SIZE (TREE_TYPE (gnu_lhs))) == INTEGER_CST
|
||||
&& TREE_OVERFLOW (TYPE_SIZE (TREE_TYPE (gnu_lhs))))
|
||||
if (TREE_CODE (TYPE_SIZE_UNIT (TREE_TYPE (gnu_lhs))) == INTEGER_CST
|
||||
&& TREE_OVERFLOW (TYPE_SIZE_UNIT (TREE_TYPE (gnu_lhs))))
|
||||
gnu_result = build_call_raise (SE_Object_Too_Large);
|
||||
else if (Nkind (Expression (gnat_node)) == N_Function_Call
|
||||
&& !Do_Range_Check (Expression (gnat_node)))
|
||||
|
|
Loading…
Add table
Reference in a new issue