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
/
pr81503.c
blob
aaa77077fcff8c1dcc7bb79ffa24e6e67edfb5b4
1
unsigned short
a
=
41461
;
2
unsigned short
b
=
3419
;
3
#if __SIZEOF_INT__ >= 4
4
int
c
=
0
;
5
6
void
foo
() {
7
if
(
a
+
b
* ~(
0
!=
5
))
8
c
= -~(
b
* ~(
0
!=
5
)) +
2147483647
;
9
}
10
#else
11
__INT32_TYPE__ c
=
0
;
12
13
void
foo
() {
14
if
(
a
+
b
* ~((
__INT32_TYPE__
)(
0
!=
5
)))
15
c
= -~(
b
* ~((
__INT32_TYPE__
)(
0
!=
5
))) +
2147483647
;
16
}
17
#endif
18
19
int
main
() {
20
foo
();
21
if
(
c
!=
2147476810
)
22
return
-
1
;
23
return
0
;
24
}