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
libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
strcmpopt_12.c
blob
d8077b62f7f93182c2a219412ec6e88dbb955aca
1
/* PR tree-optimization/96758 */
2
/* { dg-do run } */
3
/* { dg-options "-O2" } */
4
5
int
v
=
1
;
6
7
int
8
main
()
9
{
10
const char
*
s
=
v
?
"a"
:
"b"
;
11
char
x
[
5
];
12
char
y
[
5
] =
"a\0a"
;
13
__builtin_memcpy
(
x
,
y
,
sizeof
(
y
));
14
if
(
__builtin_strncmp
(
x
,
s
,
4
) !=
0
)
15
__builtin_abort
();
16
return
0
;
17
}