diff options
author | guerby <guerby@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-03 22:13:03 +0000 |
---|---|---|
committer | guerby <guerby@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-03 22:13:03 +0000 |
commit | cfd96fcf019126965884e81fca9598be86537582 (patch) | |
tree | 4f2019b171e1a4b825fa2f3f83eaeee2ee9835bb | |
parent | c4678f36eac78457d1864f9551009f88582f3362 (diff) | |
download | gcc-cfd96fcf019126965884e81fca9598be86537582.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106452 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ada/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ada/trans.c | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 31f324a142b..3239df20cd4 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -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 diff --git a/gcc/ada/trans.c b/gcc/ada/trans.c index 0e05b6d4731..cd91a368328 100644 --- a/gcc/ada/trans.c +++ b/gcc/ada/trans.c @@ -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))) |