• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 int side(int a);
2 int pure(int a) __attribute__((pure));
3 
keep(int a)4 int keep(int a) { return side(a) && 0; }
kill(int a)5 int kill(int a) { return pure(a) && 0; }
6 
7 /*
8  * check-name: kill-pure-call
9  * check-command: test-linearize -Wno-decl $file
10  * check-description:
11  *	See that the call is optimized away but only
12  *	when the function is "pure".
13  *
14  * check-output-ignore
15  * check-output-contains: call\\..* side
16  * check-output-excludes: call\\..* pure
17  */
18