OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
libgcc/
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
gcc.dg
/
pr48837.c
1
/* PR tree-optimization/48837 */
2
/* { dg-do run } */
3
/* { dg-options "-O2" } */
4
5
void abort (void);
6
7
__attribute__((noinline))
8
int baz(void)
9
{
10
return 1;
11
}
12
13
inline const int *bar(const int *a, const int *b)
14
{
15
return *a ? a : b;
16
}
17
18
int foo(int a, int b)
19
{
20
return a || b ? baz() : foo(*bar(&a, &b), 1) + foo(1, 0);
21
}
22
23
int main(void)
24
{
25
if (foo(0, 0) != 2)
26
abort();
27
28
return 0;
29
}
30