summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr78626.c
blob: ed4775a7f8b8b47ceedcd58f5eab955501d201b5 (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
/* { dg-do compile } */

int qs;

void
ms (int g1)
{
  int cy;
  int *fr = &cy;

  for (;;)
    {
      *fr = 1;
      fr = &g1;

      while (qs != 0)
        {
          if (qs | cy)
            qs = g1 / 0; /* { dg-warning "division" } */
          ++qs;
        }

      cy = 1;
      while (cy != 0)
        cy = 2;
    }
}