summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr22171.c
blob: 6a26c56d0e77c46d664aa6579141ff578f2188c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* { dg-options "-O2" } */

static unsigned int old_serial_port_irq[10];

static struct uart_8250_port {
  volatile unsigned int slock;
  unsigned int irq;
} serial8250_ports[10];

static __inline__ __attribute__((always_inline)) int irq_canonicalize(int irq)
{
  return ((irq == 2) ? 9 : irq);
}

void serial8250_isa_init_ports(void)
{
  struct uart_8250_port *up;
  int i;

  for (i = 0, up = serial8250_ports; i < 10; i++, up++)
    up->irq = irq_canonicalize(old_serial_port_irq[i]);
}

int main(void)
{
  serial8250_isa_init_ports();
  return 0;
}