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
/
981001-1.c
blob
da63f4796b87542a284ef852441344858e1e3bb4
1
#define NG 0x100L
2
3
unsigned long
flg
=
0
;
4
5
long
sub
(
int
n
)
6
{
7
int
a
,
b
;
8
9
if
(
n
>=
2
)
10
{
11
if
(
n
%
2
==
0
)
12
{
13
a
=
sub
(
n
/
2
);
14
15
return
(
a
+
2
*
sub
(
n
/
2
-
1
)) *
a
;
16
}
17
else
18
{
19
a
=
sub
(
n
/
2
+
1
);
20
b
=
sub
(
n
/
2
);
21
22
return
a
*
a
+
b
*
b
;
23
}
24
}
25
else
26
return
(
long
)
n
;
27
}
28
29
int
main
(
void
)
30
{
31
if
(
sub
(
30
) !=
832040L
)
32
flg
|=
NG
;
33
34
if
(
flg
)
35
abort
();
36
37
exit
(
0
);
38
}