aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/trans.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2012-11-28 10:51:19 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2012-11-28 10:51:19 +0000
commitce3da0d0d54ce3e469828698ba1ac5f25146b6f9 (patch)
tree66a07373943672c9d9ef3f8e395acb3f21fe89cd /gcc/ada/gcc-interface/trans.c
parentfb1fbef2735bce7c62511daf6f64343d9d97e299 (diff)
downloadgcc-ce3da0d0d54ce3e469828698ba1ac5f25146b6f9.zip
gcc-ce3da0d0d54ce3e469828698ba1ac5f25146b6f9.tar.gz
gcc-ce3da0d0d54ce3e469828698ba1ac5f25146b6f9.tar.bz2
stor-layout.c (layout_type): Do not clear TREE_OVERFLOW on overflowed zeroes, except in one specific case.
* stor-layout.c (layout_type) <ARRAY_TYPE>: Do not clear TREE_OVERFLOW on overflowed zeroes, except in one specific case. ada/ * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Use valid_constant_size_p to detect too large objects. <E_Subprogram_Type>: Likewise for too large return types. (allocatable_size_p): Call valid_constant_size_p in the fixed case. (annotate_value) <INTEGER_CST>: Simplify. <BIT_AND_EXPR>: Deal with negative values here. * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Use valid_constant_size_p to detect too large objects on the LHS. * gcc-interface/misc.c (default_pass_by_ref): Likewise for large types. And use TYPE_SIZE_UNIT throughout. (must_pass_by_ref): Likewise. * gcc-interface/utils.c (max_size) <tcc_unary>: Split from common case. <tcc_binary>: Likewise. Call size_binop instead of fold_build2. <tcc_expression>: Simplify. * gcc-interface/utils2.c (build_allocator): Use valid_constant_size_p to detect too large allocations. From-SVN: r193886
Diffstat (limited to 'gcc/ada/gcc-interface/trans.c')
-rw-r--r--gcc/ada/gcc-interface/trans.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c
index 7194129..291d00f 100644
--- a/gcc/ada/gcc-interface/trans.c
+++ b/gcc/ada/gcc-interface/trans.c
@@ -6115,7 +6115,7 @@ 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_UNIT (TREE_TYPE (gnu_lhs))) == INTEGER_CST
- && TREE_OVERFLOW (TYPE_SIZE_UNIT (TREE_TYPE (gnu_lhs))))
+ && !valid_constant_size_p (TYPE_SIZE_UNIT (TREE_TYPE (gnu_lhs))))
gnu_result = build_call_raise (SE_Object_Too_Large, gnat_node,
N_Raise_Storage_Error);
else if (Nkind (Expression (gnat_node)) == N_Function_Call)