aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/utils2.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2010-04-15 21:15:47 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2010-04-15 21:15:47 +0000
commit58c8f7700a237538681b287d03625ca85a71e651 (patch)
tree1b4bd01f3488b586b49c260c1be8487436d8f1ad /gcc/ada/gcc-interface/utils2.c
parent1fc24649bc296400468fdd26eb93f144fdafdfbf (diff)
downloadgcc-58c8f7700a237538681b287d03625ca85a71e651.zip
gcc-58c8f7700a237538681b287d03625ca85a71e651.tar.gz
gcc-58c8f7700a237538681b287d03625ca85a71e651.tar.bz2
cuintp.c (UI_To_gnu): Fix long line.
* gcc-interface/cuintp.c (UI_To_gnu): Fix long line. * gcc-interface/gigi.h (MARK_VISITED): Skip objects of constant class. (process_attributes): Delete. (post_error_ne_num): Change parameter name. * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force debug info with -g3. Remove a couple of obsolete lines. Minor tweaks. If type annotating mode, operate on trees to compute the adjustment to the sizes of tagged types. Fix long line. (cannot_be_superflat_p): Tweak head comment. (annotate_value): Fold local constant. (set_rm_size): Fix long line. * gcc-interface/trans.c (Identifier_to_gnu): Rework comments. (Attribute_to_gnu): Fix long line. <Attr_Size>: Remove useless assertion. Reorder statements. Use size_binop routine. (Loop_Statement_to_gnu): Use build5 in lieu of build_nt. Create local variables for the label and the test. Tweak comments. (Subprogram_Body_to_gnu): Reset cfun to NULL. (Compilation_Unit_to_gnu): Use the Sloc of the Unit node. (process_inlined_subprograms): Integrate into... (Compilation_Unit_to_gnu): ...this. (gnat_to_gnu): Fix long line. (post_error_ne_num): Change parameter name. * gcc-interface/utils.c (process_attributes): Static-ify. <ATTR_MACHINE_ATTRIBUTE>: Set input_location before proceeding. (create_type_decl): Add comment. (create_var_decl_1): Process the attributes after adding the VAR_DECL to the current binding level. (create_subprog_decl): Likewise for the FUNCTION_DECL. (end_subprog_body): Do not reset cfun to NULL. (build_vms_descriptor32): Fix long line. (build_vms_descriptor): Likewise. (handle_nonnull_attribute): Likewise. (convert_vms_descriptor64): Likewise. * gcc-interface/utils2.c (fill_vms_descriptor): Fix long line. (gnat_protect_expr): Fix thinko. From-SVN: r158390
Diffstat (limited to 'gcc/ada/gcc-interface/utils2.c')
-rw-r--r--gcc/ada/gcc-interface/utils2.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c
index 3a5b962..b6bd268 100644
--- a/gcc/ada/gcc-interface/utils2.c
+++ b/gcc/ada/gcc-interface/utils2.c
@@ -2121,7 +2121,8 @@ fill_vms_descriptor (tree expr, Entity_Id gnat_formal, Node_Id gnat_actual)
convert (long_integer_type_node,
addr64expr),
malloc64low),
- build_call_raise (CE_Range_Check_Failed, gnat_actual,
+ build_call_raise (CE_Range_Check_Failed,
+ gnat_actual,
N_Raise_Constraint_Error),
NULL_TREE));
}
@@ -2228,9 +2229,12 @@ gnat_protect_expr (tree exp)
unshared for gimplification; in order to avoid a complexity explosion
at that point, we protect any expressions more complex than a simple
arithmetic expression. */
- if (!TREE_SIDE_EFFECTS (exp)
- && !EXPRESSION_CLASS_P (skip_simple_arithmetic (exp)))
- return exp;
+ if (!TREE_SIDE_EFFECTS (exp))
+ {
+ tree inner = skip_simple_arithmetic (exp);
+ if (!EXPR_P (inner) || REFERENCE_CLASS_P (inner))
+ return exp;
+ }
/* If this is a conversion, protect what's inside the conversion. */
if (code == NON_LVALUE_EXPR