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.dg
/
pr81020.c
blob
4c70236d88fa3d0f517f5c93e17ad965621a4069
1
/* PR rtl-optimization/81020 */
2
/* { dg-do run } */
3
/* { dg-options "-O -fno-tree-bit-ccp -fno-tree-coalesce-vars -fno-tree-vrp" } */
4
5
unsigned
v
=
4
;
6
7
unsigned long long
__attribute__
((
noipa
))
8
foo
(
unsigned
x
)
9
{
10
#if __SIZEOF_INT__ == 2
11
__UINT32_TYPE__ a
=
v
;
12
#else
13
unsigned
a
=
v
;
14
#endif
15
a
&=
1
;
16
x
|=
0
<
a
;
17
a
>>=
31
;
18
return
x
+
a
;
19
}
20
21
int
22
main
()
23
{
24
if
(
foo
(
2
) !=
2
)
25
__builtin_abort
();
26
return
0
;
27
}