Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-27.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-ccp1" } */
3
4 #include <string.h>
5
6 char c[10];
7
8 void
9 f1 ()
10 {
11 const char *p = "123456";
12 memcpy (c, p, 6);
13 }
14
15 void
16 f2 ()
17 {
18 const char *p = "12345678";
19 p += 2;
20 memcpy (c, p, 6);
21 }
22
23 /* { dg-final { scan-tree-dump-times "memcpy\[^\n\]*123456" 2 "ccp1" } } */