1  /* { dg-do compile } */
       2  /* { dg-options "-O2 -fdump-tree-optimized" } */
       3  
       4  extern char str[];
       5  
       6  unsigned int foo()
       7  {
       8    __builtin_memset(str,'x',5);
       9    str[5] = 0;
      10    return __builtin_strlen (str);
      11  }
      12  
      13  /* { dg-final { scan-tree-dump-not "strlen" "optimized" } } */