public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/61056] New: strchr (x, 0) is not converted to strlen (x)
@ 2014-05-04 16:22 olegendo at gcc dot gnu.org
  2014-05-04 16:47 ` [Bug tree-optimization/61056] " jakub at gcc dot gnu.org
  2014-05-04 16:59 ` olegendo at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: olegendo at gcc dot gnu.org @ 2014-05-04 16:22 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61056

            Bug ID: 61056
           Summary: strchr (x, 0) is not converted to strlen (x)
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: olegendo at gcc dot gnu.org
            Target: sh*-*-*

At least on SH and r210026 the following:

extern "C" const char* strchr (const char*,int);

const char* test (const char* x)
{
  return strrchr (x, 0);
}

does not get converted to a strlen (x).  It seems that tree-ssa-strlen is
trying to do something but always fails.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-04 16:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-04 16:22 [Bug tree-optimization/61056] New: strchr (x, 0) is not converted to strlen (x) olegendo at gcc dot gnu.org
2014-05-04 16:47 ` [Bug tree-optimization/61056] " jakub at gcc dot gnu.org
2014-05-04 16:59 ` olegendo at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).