utils.c (fold_bit_position): New function.
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 24 Feb 2017 10:48:38 +0000 (10:48 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Fri, 24 Feb 2017 10:48:38 +0000 (10:48 +0000)
commit491527afb8bcf02fc91fbddc66b27a0dc25c2bd1
tree5b0c493558a4f1c75429d65375cd897b7b2660f9
parent0b9cdb9a4011886f0166a648f874f880ac9e026a
utils.c (fold_bit_position): New function.

* gcc-interface/utils.c (fold_bit_position): New function.
(rest_of_record_type_compilation): Call it instead of bit_position to
compute the field position and remove the call to remove_conversions.
(compute_related_constant): Factor out the multiplication in both
operands, if any, and streamline the final test.

From-SVN: r245704
gcc/ada/ChangeLog
gcc/ada/gcc-interface/utils.c