kill-store.c 399 B

1234567891011121314151617
  1. void keep(int *p) { *p = 0; }
  2. void kill(int *p, int i) { if (i && 0) *p = 0; }
  3. void dead(int *p, int i) { int v = i++; if (i && 0) p[v] = 0; }
  4. /*
  5. * check-name: kill-store
  6. * check-command: test-linearize -Wno-decl $file
  7. * check-description:
  8. * Check that stores are optimized away but only
  9. * when needed:
  10. * - bb unreachable.
  11. *
  12. * check-output-ignore
  13. * check-output-pattern(1): store\\.
  14. */