https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92128
Christophe Lyon <clyon at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |clyon at gcc dot gnu.org
--- Comment #1 from Christophe Lyon <clyon at gcc dot gnu.org> ---
(In reply to Martin Sebor from comment #0)
> With pr91996 resolved GCC can make use of strlen range information in some
> contexts but not in others. The test for pr91996 only enabled on a subset
> of those where GCC is known to be able to do this, but even for those it is
> specially crafted to exercise only the contexts where the optimization was
> implemented. On other targets (e.g., arm-*-*), or even on others such as
> aarch64-*-* where the test passes, other similar test cases fail. This is
> because the solution for pr91996 was only put in place for multi-byte
> assignments via MEM_REF but not also for calls to memcpy.
>
After r277076 (fix for pr91996), I have noticed that the new test
strlenopt-81.c fails in some cases on arm, is that what you mean above?
For instance, when compiling with -march=armv5t, the test fails because:
FAIL: gcc.dg/strlenopt-81.c (test for excess errors)
Excess errors:
strlenopt-81.c:(.text+0x1e4): undefined reference to
`test_on_line_97_not_eliminated'
strlenopt-81.c:(.text+0x3b8): undefined reference to
`test_on_line_156_not_eliminated'
strlenopt-81.c:(.text+0x40c): undefined reference to
`test_on_line_172_not_eliminated'
UNRESOLVED: gcc.dg/strlenopt-81.c compilation failed to produce executable