aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr109469.c
blob: d05a93b67833b9802c90e16a9670c530b0ec1620 (plain)
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;
}