or element of. Also determine the size of the largest character
array the string may refer to. */
SRK_LENRANGE,
- /* Temporary until the rest of Martin's strlen range work is integrated. */
- SRK_LENRANGE_2,
/* Determine the integer value of the argument (not string length). */
SRK_INT_VALUE
};
pdata, eltsize);
}
else if (TREE_CODE (TREE_OPERAND (op, 0)) == COMPONENT_REF
- && (rkind == SRK_LENRANGE || rkind == SRK_LENRANGE_2))
+ && rkind == SRK_LENRANGE)
{
/* Fail if an array is the last member of a struct object
since it could be treated as a (fake) flexible array
}
}
- if (!val && (rkind == SRK_LENRANGE || rkind == SRK_LENRANGE_2))
+ if (!val && rkind == SRK_LENRANGE)
{
if (TREE_CODE (arg) == ADDR_EXPR)
return get_range_strlen (TREE_OPERAND (arg, 0), visited, rkind,
on the length of the string based on the referenced object's
or subobject's type. Determine the conservative upper bound
based on the enclosing object's size if possible. */
- if (rkind == SRK_LENRANGE || rkind == SRK_LENRANGE_2)
+ if (rkind == SRK_LENRANGE)
{
poly_int64 offset;
tree base = get_addr_base_and_unit_offset (arg, &offset);
}
pdata->maxlen = val;
- return rkind == SRK_LENRANGE || rkind == SRK_LENRANGE_2 || !integer_all_onesp (val);
+ return rkind == SRK_LENRANGE || !integer_all_onesp (val);
}
/* For an ARG referencing one or more strings, try to obtain the range
for (unsigned int i = 0; i < 2; i++)
if (!get_range_strlen (ops[i], visited, rkind, pdata, eltsize))
{
- if (rkind != SRK_LENRANGE_2)
+ if (rkind != SRK_LENRANGE)
return false;
/* Set the upper bound to the maximum to prevent
it from being adjusted in the next iteration but
if (!get_range_strlen (arg, visited, rkind, pdata, eltsize))
{
- if (rkind != SRK_LENRANGE_2)
+ if (rkind != SRK_LENRANGE)
return false;
/* Set the upper bound to the maximum to prevent
it from being adjusted in the next iteration but
4 for wide characer strings. ELTSIZE is by default 1. */
bool
-get_range_strlen (tree arg, c_strlen_data *pdata, unsigned eltsize, bool strict)
+get_range_strlen (tree arg, c_strlen_data *pdata, unsigned eltsize)
{
bitmap visited = NULL;
- if (!get_range_strlen (arg, &visited, strict ? SRK_LENRANGE : SRK_LENRANGE_2,
- pdata, eltsize))
+ if (!get_range_strlen (arg, &visited, SRK_LENRANGE, pdata, eltsize))
{
/* On failure extend the length range to an impossible maximum
(a valid MAXLEN must be less than PTRDIFF_MAX - 1). Other
extern tree canonicalize_constructor_val (tree, tree);
extern tree get_symbol_constant_value (tree);
struct c_strlen_data;
-extern bool get_range_strlen (tree, c_strlen_data *, unsigned eltsize, bool = false);
+extern bool get_range_strlen (tree, c_strlen_data *, unsigned eltsize);
extern void gimplify_and_update_call_from_tree (gimple_stmt_iterator *, tree);
extern bool fold_stmt (gimple_stmt_iterator *);
extern bool fold_stmt (gimple_stmt_iterator *, tree (*) (tree));