1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/* { dg-do compile } */ __attribute__((returns_twice)) int foo(); struct xio myproc; struct xio { void (*read_proc)(); void (*write_proc)(); }; void dummy_write_proc() { switch (foo()) default: myproc.read_proc = myproc.write_proc = dummy_write_proc; }