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
PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
builtins
/
lib
/
mempcpy.c
blob
bc16da536fff60e3c12869389a326a33dd58baf5
1
extern
void
abort
(
void
);
2
extern
int
inside_main
;
3
4
__attribute__
((
__noinline__
))
5
void
*
6
mempcpy
(
void
*
dst
,
const void
*
src
,
__SIZE_TYPE__ n
)
7
{
8
const char
*
srcp
;
9
char
*
dstp
;
10
11
#ifdef __OPTIMIZE__
12
if
(
inside_main
)
13
abort
();
14
#endif
15
16
srcp
=
src
;
17
dstp
=
dst
;
18
while
(
n
-- !=
0
)
19
*
dstp
++ = *
srcp
++;
20
21
return
dstp
;
22
}