This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/15739] New: Convert strstr into strchr if we are looking for a single character.


char *
foo (const char *haystack)
{
  const char *needle = "a";
  return strstr (haystack, needle);
}

I get:

foo (haystack)
{
  const char * needle;
  char * T.0;

<bb 0>:
  T.0_3 = strstr (haystack_2, "a") [tail call];
  return T.0_3;

}

-- 
           Summary: Convert strstr into strchr if we are looking for a
                    single character.
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kazu at cs dot umass dot edu
                CC: gcc-bugs at gcc dot gnu dot org


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]