1 int side(int a);
2 int pure(int a) __attribute__((pure));
3
4 int keep(int a) { return side(a) && 0; }
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 */