summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/mips/pr33755.c
blob: ca6a1e6984d806a5fbc2dd0d04028685f0f2a7c2 (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
29
30
/* { dg-do link } */
/* { dg-options "-O2" } */

volatile int gv;
const char *ptrs[2];

void
foo (volatile int *v, const char **ptrs)
{
  switch (*v & 1)
    {
    case 0:
      ptrs[0] = 0;
      break;
    case 1:
      break;
    default:
      ptrs[1] = "Some text";
      break;
    }
  while (*v > 0)
    *v -= 1;
}

int
main (void)
{
  foo (&gv, ptrs);
  return 0;
}