+2015-10-22 Mikhail Maltsev <maltsevm@gmail.com>
+
+ * gcc-interface/decl.c (gnat_to_gnu_entity): Use gcc_checking_assert.
+ * gcc-interface/trans.c (assoc_to_constructor): Use flag_checking.
+ * gcc-interface/utils.c (relate_alias_sets): Likewise.
+ * gcc-interface/utils2.c (build_binary_op, build_unary_op): Use
+ gcc_checking_assert
+
2015-10-20 Yannick Moy <moy@adacore.com>
* fmap.adb, a-cihama.adb, sem_ch5.adb, make.adb, inline.adb,
TYPE_HAS_ACTUAL_BOUNDS_P (gnu_inner) = 1;
-#ifdef ENABLE_CHECKING
/* Check for other cases of overloading. */
- gcc_assert (!TYPE_ACTUAL_BOUNDS (gnu_inner));
-#endif
+ gcc_checking_assert (!TYPE_ACTUAL_BOUNDS (gnu_inner));
}
for (gnat_index = First_Index (gnat_entity);
gnu_result = extract_values (gnu_list, gnu_type);
-#ifdef ENABLE_CHECKING
- /* Verify that every entry in GNU_LIST was used. */
- for (; gnu_list; gnu_list = TREE_CHAIN (gnu_list))
- gcc_assert (TREE_ADDRESSABLE (gnu_list));
-#endif
+ if (flag_checking)
+ {
+ /* Verify that every entry in GNU_LIST was used. */
+ for (; gnu_list; gnu_list = TREE_CHAIN (gnu_list))
+ gcc_assert (TREE_ADDRESSABLE (gnu_list));
+ }
return gnu_result;
}
/* The alias set shouldn't be copied between array types with different
aliasing settings because this can break the aliasing relationship
between the array type and its element type. */
-#ifndef ENABLE_CHECKING
- if (flag_strict_aliasing)
-#endif
+ if (flag_checking || flag_strict_aliasing)
gcc_assert (!(TREE_CODE (gnu_new_type) == ARRAY_TYPE
&& TREE_CODE (gnu_old_type) == ARRAY_TYPE
&& TYPE_NONALIASED_COMPONENT (gnu_new_type)
{
case INIT_EXPR:
case MODIFY_EXPR:
-#ifdef ENABLE_CHECKING
- gcc_assert (result_type == NULL_TREE);
-#endif
+ gcc_checking_assert (result_type == NULL_TREE);
+
/* If there were integral or pointer conversions on the LHS, remove
them; we'll be putting them back below if needed. Likewise for
conversions between array and record types, except for justified
case TRUTH_AND_EXPR:
case TRUTH_OR_EXPR:
case TRUTH_XOR_EXPR:
-#ifdef ENABLE_CHECKING
- gcc_assert (TREE_CODE (get_base_type (result_type)) == BOOLEAN_TYPE);
-#endif
+ gcc_checking_assert (TREE_CODE (
+ get_base_type (result_type)) == BOOLEAN_TYPE);
operation_type = left_base_type;
left_operand = convert (operation_type, left_operand);
right_operand = convert (operation_type, right_operand);
case LT_EXPR:
case EQ_EXPR:
case NE_EXPR:
-#ifdef ENABLE_CHECKING
- gcc_assert (TREE_CODE (get_base_type (result_type)) == BOOLEAN_TYPE);
-#endif
+ gcc_checking_assert (TREE_CODE (
+ get_base_type (result_type)) == BOOLEAN_TYPE);
/* If either operand is a NULL_EXPR, just return a new one. */
if (TREE_CODE (left_operand) == NULL_EXPR)
return build2 (op_code, result_type,
break;
case TRUTH_NOT_EXPR:
-#ifdef ENABLE_CHECKING
- gcc_assert (TREE_CODE (get_base_type (result_type)) == BOOLEAN_TYPE);
-#endif
+ gcc_checking_assert (TREE_CODE (
+ get_base_type (result_type)) == BOOLEAN_TYPE);
result = invert_truthvalue_loc (EXPR_LOCATION (operand), operand);
/* When not optimizing, fold the result as invert_truthvalue_loc
doesn't fold the result of comparisons. This is intended to undo
+2015-10-22 Mikhail Maltsev <maltsevm@gmail.com>
+
+ * decl.c (java_mark_decl_local): Use flag_checking instead of
+ ENABLE_CHECKING.
+
2015-07-15 Andrew MacLeod <amacleod@redhat.com>
* expr.c: Remove multiline #include comment.
{
DECL_EXTERNAL (decl) = 0;
-#ifdef ENABLE_CHECKING
/* Double check that we didn't pass the function to the callgraph early. */
- if (TREE_CODE (decl) == FUNCTION_DECL)
+ if (flag_checking && TREE_CODE (decl) == FUNCTION_DECL)
{
struct cgraph_node *node = cgraph_node::get (decl);
gcc_assert (!node || !node->definition);
}
-#endif
gcc_assert (!DECL_RTL_SET_P (decl));
}