On 9/15/18 2:43 AM, Bernd Edlinger wrote: > Hi, > > this is an update on my strlen range patch (V7). Again re-based and > retested to current trunk. > > I am aware that Martin wants to re-factor the interface of get_range_strlen > and have no objections against, but I'd suggest that to be a follow-up patch. > > I might suggest to rename one of the two get_range_strlen functions at the > same time as it is rather confusing to have to count the parameters in order > to tell which function is meant. > > Bootstrapped and reg-tested on x86_64-pc-linux-gnu. > Is it OK for trunk? > > > Thanks > Bernd. > > > changelog-range-strlen-v7.txt > > gcc: > 2018-08-26 Bernd Edlinger <bernd.edlin...@hotmail.de> > > * gimple-fold.c (looks_like_a_char_array_without_typecast_p): New > helper function for strlen range estimations. > (get_range_strlen): Use looks_like_a_char_array_without_typecast_p > for warnings, but use GIMPLE semantics otherwise. > * tree-ssa-strlen.c (maybe_set_strlen_range): Use GIMPLE semantics. > (get_min_string_length): Avoid not NUL terminated string literals. > > testsuite: > 2018-08-26 Bernd Edlinger <bernd.edlin...@hotmail.de> > > * c-c++-common/attr-nonstring-3.c: Remove xfail. > * gcc.dg/pr83373.c: Add xfail. > * gcc.dg/strlenopt-36.c: Add xfail. > * gcc.dg/strlenopt-40.c: Adjust test expectations. > * gcc.dg/strlenopt-45.c: Adjust test expectations. > * gcc.dg/strlenopt-48.c: Add xfail. > * gcc.dg/strlenopt-51.c: Adjust test expectations. > * gcc.dg/strlenopt-59.c: New test. > * gcc.dg/strlenopt-60.c: New test. Just an FYI -- this is not forgotten. I'll be poking at it tomorrow.
Jeff