PR target/83368
[official-gcc.git] / gcc / testsuite / gcc.dg / strlenopt-25.c
blob89b60e3ebed3bbac489f6db7705cdb5014f634d9
1 /* { dg-do run } */
2 /* { dg-options "-O2 -fdump-tree-strlen" } */
4 #include "strlenopt.h"
6 int
7 main ()
9 char p[] = "foobar";
10 int len, len2;
11 len = strlen (p);
12 p[0] = 'O';
13 len2 = strlen (p);
14 return len - len2;
17 /* { dg-final { scan-tree-dump-times "strlen \\(" 0 "strlen" } } */