2009-05-23 Eric Botcazou <ebotcazou@adacore.com>
+ * gcc-interface/misc.c (gnat_get_subrange_bounds): Fix thinko.
+
+2009-05-23 Eric Botcazou <ebotcazou@adacore.com>
+
* gcc-interface/decl.c (set_rm_size): Bypass the check for packed array
types.
{
tree min = TYPE_MIN_VALUE (gnu_type);
tree max = TYPE_MAX_VALUE (gnu_type);
- *lowval = TREE_CONSTANT (min) ? min : TYPE_GCC_MIN_VALUE (gnu_type);
- *highval = TREE_CONSTANT (max) ? max : TYPE_GCC_MAX_VALUE (gnu_type);
+ /* If the bounds aren't constant, use non-representable constant values
+ to get the same effect on debug info without tree sharing issues. */
+ *lowval
+ = TREE_CONSTANT (min) ? min : build_int_cstu (integer_type_node, -1);
+ *highval
+ = TREE_CONSTANT (max) ? max : build_int_cstu (integer_type_node, -1);
}
/* GNU_TYPE is a type. Determine if it should be passed by reference by