aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/decl.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2021-05-21 10:19:32 +0200
committerEric Botcazou <ebotcazou@adacore.com>2021-05-21 10:21:09 +0200
commite5bfda020425f22b67936e916f0b284bad108b65 (patch)
tree94903a334e1554905aaffabf984923a4671e4d02 /gcc/ada/gcc-interface/decl.c
parentdcde81134cb24da8e261a4346c806c676297922b (diff)
downloadgcc-e5bfda020425f22b67936e916f0b284bad108b65.zip
gcc-e5bfda020425f22b67936e916f0b284bad108b65.tar.gz
gcc-e5bfda020425f22b67936e916f0b284bad108b65.tar.bz2
Use EXACT_DIV_EXPR as much as possible
...when the division is exact, typically dividing TYPE_SIZE by BITS_PER_UNIT. gcc/ada/ * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Replace CEIL_DIV_EXPR with EXACT_DIV_EXPR. * gcc-interface/misc.c (gnat_type_max_size): Likewise. * gcc-interface/utils.c (maybe_pad_type): Likewise. (finish_record_type): Likewise. And always compute the unit size.
Diffstat (limited to 'gcc/ada/gcc-interface/decl.c')
-rw-r--r--gcc/ada/gcc-interface/decl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index 232b552..a7595cb 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -1343,7 +1343,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
|| (gnu_size
&& !allocatable_size_p (convert (sizetype,
size_binop
- (CEIL_DIV_EXPR, gnu_size,
+ (EXACT_DIV_EXPR, gnu_size,
bitsize_unit_node)),
global_bindings_p ()
|| !definition