On 05/10/2013 08:49 AM, Jakub Jelinek wrote:
Hi!

Related to the previously posted patch, I've noticed that
on the attached testcase we don't optimize the strlen into
constant, even when we easily could.

Implemented thusly, bootstrapped/regtested on x86_64-linux and i686-linux,
ok for trunk?

2013-05-10  Jakub Jelinek  <ja...@redhat.com>

        PR tree-optimization/57230
        * tree-ssa-strlen.c (handle_char_store): Record length for
        array store from STRING_CST.

        * gcc.dg/strlenopt-24.c: New test.
OK.

A bit surprised we weren't already handling this...

jeff

Reply via email to