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
PR middle-end/40692
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
builtin-constant.c
1
/* PR optimization/8423. */
2
3
#define btest(x) __builtin_constant_p(x) ? "1" : "0"
4
5
#ifdef __OPTIMIZE__
6
void
7
foo (char *i)
8
{
9
if (*i == '0')
10
abort ();
11
}
12
#else
13
void
14
foo (char *i)
15
{
16
}
17
#endif
18
19
int
20
main (void)
21
{
22
int size = sizeof (int);
23
foo (btest (size));
24
foo (btest (size));
25
exit (0);
26
}