* gcc-interface/trans.c (Loop_Statement_to_gnu): Use IN_RANGE macro.
* gcc-interface/misc.c (gnat_get_array_descr_info): Likewise.
(default_pass_by_ref): Likewise.
* gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
From-SVN: r255854
+2017-12-20 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/trans.c (Loop_Statement_to_gnu): Use IN_RANGE macro.
+ * gcc-interface/misc.c (gnat_get_array_descr_info): Likewise.
+ (default_pass_by_ref): Likewise.
+ * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
+
2017-12-19 Jakub Jelinek <jakub@redhat.com>
* gcc-interface/trans.c (Loop_Statement_to_gnu): Replace Yoda
conditions with typical order conditions.
- * gcc-interface/misc.c (gnat_get_array_descr_info,
- default_pass_by_ref): Likewise.
+ * gcc-interface/misc.c (gnat_get_array_descr_info): Likewise.
+ (default_pass_by_ref): Likewise.
* gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
* adaint.c (__gnat_tmp_name): Likewise.
index to the template. */
for (index = (convention_fortran_p ? ndim - 1 : 0),
gnat_index = First_Index (gnat_entity);
- index >= 0 && index < ndim;
+ IN_RANGE (index, 0, ndim - 1);
index += (convention_fortran_p ? - 1 : 1),
gnat_index = Next_Index (gnat_index))
{
gnat_index = First_Index (gnat_entity),
gnat_base_index
= First_Index (Implementation_Base_Type (gnat_entity));
- index >= 0 && index < ndim;
+ IN_RANGE (index, 0, ndim - 1);
index += (convention_fortran_p ? - 1 : 1),
gnat_index = Next_Index (gnat_index),
gnat_base_index = Next_Index (gnat_base_index))
structure. */
for (i = (convention_fortran_p ? info->ndimensions - 1 : 0),
dimen = first_dimen;
- i >= 0 && i < info->ndimensions;
+ IN_RANGE (i, 0, info->ndimensions - 1);
i += (convention_fortran_p ? -1 : 1),
dimen = TREE_TYPE (dimen))
{
/* Note that loop unswitching can only be applied a small number of
times to a given loop (PARAM_MAX_UNSWITCH_LEVEL default to 3). */
- if (n_remaining_checks > 0 && n_remaining_checks <= 3
- && optimize > 1 && !optimize_size)
+ if (IN_RANGE (n_remaining_checks, 1, 3)
+ && optimize > 1
+ && !optimize_size)
FOR_EACH_VEC_ELT (*gnu_loop_info->checks, i, rci)
if (rci->invariant_cond != boolean_false_node)
{