diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2016-04-27 10:49:35 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2016-04-27 10:49:35 +0000 |
commit | afc737f05213af90e74b1b62efe4039dbc3a7fc2 (patch) | |
tree | 2dbbe4060eceb145e54f50961129a316f38fc56c /gcc/ada/gcc-interface/utils2.c | |
parent | a2e76867ad58dd0d7b5e09b95533029ad0659202 (diff) | |
download | gcc-afc737f05213af90e74b1b62efe4039dbc3a7fc2.zip gcc-afc737f05213af90e74b1b62efe4039dbc3a7fc2.tar.gz gcc-afc737f05213af90e74b1b62efe4039dbc3a7fc2.tar.bz2 |
gigi.h (gnat_to_gnu_entity): Adjust prototype.
* gcc-interface/gigi.h (gnat_to_gnu_entity): Adjust prototype.
(maybe_pad_type): Adjust comment.
(finish_record_type): Likewise.
(rest_of_record_type_compilation): Likewise.
* gcc-interface/decl.c (gnat_to_gnu_entity): Change DEFINITION type
parameter from integer to boolean. Adjust recursive calls.
<E_Subprogram_Type>: Use copy_type and remove redundant assignments.
<E_Signed_Integer_Subtype>: Adjust comment. Remove call to
rest_of_record_type_compilation. Set TYPE_PADDING_P flag earlier.
Pass false to finish_record_type. Set the debug type later.
<E_Record_Subtype>: Remove call to rest_of_record_type_compilation.
(gnat_to_gnu_component_type): Fix formatting.
(gnat_to_gnu_field_decl): Adjust call to gnat_to_gnu_entity.
(gnat_to_gnu_type): Likewise.
* gcc-interface/trans.c (Identifier_to_gnu): Likewise.
(Loop_Statement_to_gnu): Likewise.
(Subprogram_Body_to_gnu): Likewise.
(Exception_Handler_to_gnu_fe_sjlj): Likewise.
(Exception_Handler_to_gnu_gcc): Likewise.
(Compilation_Unit_to_gnu): Likewise.
(gnat_to_gnu): Likewise.
(push_exception_label_stack): Likewise.
(elaborate_all_entities_for_package): Likewise.
(process_freeze_entity): Likewise.
(process_decls): Likewise.
(process_type): Likewise.
* gcc-interface/utils.c (struct deferred_decl_context_node): Tweak.
(maybe_pad_type): Adjust comments. Set the debug type later. Remove
call to rest_of_record_type_compilation.
(rest_of_record_type_compilation): Use copy_type.
(copy_type): Use correctly typed constants.
(gnat_signed_or_unsigned_type_for): Use copy_type.
* gcc-interface/utils2.c (nonbinary_modular_operation): Likewise.
(build_goto_raise): Adjust call tognat_to_gnu_entity.
From-SVN: r235479
Diffstat (limited to 'gcc/ada/gcc-interface/utils2.c')
-rw-r--r-- | gcc/ada/gcc-interface/utils2.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c index c1bb74d..d5dd436 100644 --- a/gcc/ada/gcc-interface/utils2.c +++ b/gcc/ada/gcc-interface/utils2.c @@ -560,8 +560,8 @@ nonbinary_modular_operation (enum tree_code op_code, tree type, tree lhs, if (TYPE_PRECISION (op_type) < precision || TYPE_UNSIGNED (op_type) != unsignedp) { - /* Copy the node so we ensure it can be modified to make it modular. */ - op_type = copy_node (gnat_type_for_size (precision, unsignedp)); + /* Copy the type so we ensure it can be modified to make it modular. */ + op_type = copy_type (gnat_type_for_size (precision, unsignedp)); modulus = convert (op_type, modulus); SET_TYPE_MODULUS (op_type, modulus); TYPE_MODULAR_P (op_type) = 1; @@ -577,7 +577,8 @@ nonbinary_modular_operation (enum tree_code op_code, tree type, tree lhs, possible size. */ if (op_code == MULT_EXPR) { - tree div_type = copy_node (gnat_type_for_size (needed_precision, 1)); + /* Copy the type so we ensure it can be modified to make it modular. */ + tree div_type = copy_type (gnat_type_for_size (needed_precision, 1)); modulus = convert (div_type, modulus); SET_TYPE_MODULUS (div_type, modulus); TYPE_MODULAR_P (div_type) = 1; @@ -1761,9 +1762,10 @@ build_goto_raise (tree label, int msg) /* If Local_Raise is present, build Local_Raise (Exception'Identity). */ if (Present (local_raise)) { - tree gnu_local_raise = gnat_to_gnu_entity (local_raise, NULL_TREE, 0); + tree gnu_local_raise + = gnat_to_gnu_entity (local_raise, NULL_TREE, false); tree gnu_exception_entity - = gnat_to_gnu_entity (Get_RT_Exception_Entity (msg), NULL_TREE, 0); + = gnat_to_gnu_entity (Get_RT_Exception_Entity (msg), NULL_TREE, false); tree gnu_call = build_call_n_expr (gnu_local_raise, 1, build_unary_op (ADDR_EXPR, NULL_TREE, |