PR tree-optimization/93683 - ICE on calloc with unused return value in ao_ref_init_fr...
[gcc.git] / gcc / testsuite / gcc.dg / pr83480.c
1 /* PR debug/83480 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -g -fselective-scheduling2 -ftree-vectorize -freorder-blocks-algorithm=simple -fnon-call-exceptions -fno-guess-branch-probability -fno-peephole2 -fno-tree-sink -fno-tree-scev-cprop" } */
4
5 signed char a, b;
6
7 void
8 foo (int x, int y)
9 {
10 for (a = 1; a != 0; ++a)
11 ;
12
13 for (;;)
14 {
15 int c;
16
17 b %= (y != 0 && a != 0) + 1;
18 if (a != 0)
19 y = b;
20
21 for (c = 0; c < 50; ++c)
22 ++x;
23
24 if (a < 1)
25 {
26 while (x != 0)
27 ;
28
29 a /= 0; /* { dg-warning "division by zero" } */
30 }
31 }
32 }