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