/* run.config
   STDOPT: +"-metrics-eva-cover -metrics-cover main -load-module scope"
   STDOPT: +"-metrics-eva-cover -main foobar -metrics-cover foobar -load-module scope"
**/

void (*bar) (int);  extern void (*bar_extern) (int);

void baz (int j) { return; }

int foobar () {
  bar = baz;
  bar (2);
  return 0;
}

void foo (int k) {
  int i = 0;
  return;
}

/* foo is unreachable since j is always 0 */
int main() {
  int j = 0;
  if (!j) {
    return 1;
  }
  else {
    if (bar == bar_extern) exit (1);
    bar = foo;
    bar (1);
    return 0;
  }
}
