Adjust scan string for PIE
[official-gcc.git] / gcc / testsuite / gcc.dg / pr64440.c
blobf9cc46d0a5caede7477a0467d89422692921bdd2
1 /* PR c/64440 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wall -O2" } */
5 int
6 foo (int x)
8 const int y = 0;
9 int r = 0;
10 r += x / y; /* { dg-warning "division by zero" } */
11 r += x / 0; /* { dg-warning "division by zero" } */
12 r += x % y; /* { dg-warning "division by zero" } */
13 r += x % 0; /* { dg-warning "division by zero" } */
14 return r;