repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
tree-ssa
/
ssa-ccp-27.c
blob
243d72174148d8c1847ea05f5343e6f900c8528e
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" } } */