1 /* { dg-do compile } */ 2 /* { dg-options "-O2 -fdump-tree-ccp1" } */ 3 4 #include <string.h> 5 6 char c[10]; 7 8 void f1()9f1 () 10 { 11 const char *p = "123456"; 12 memcpy (c, p, 6); 13 } 14 15 void f2()16f2 () 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" } } */ 24