2017-09-26 Thomas Koenig <tkoenig@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gcc.dg / asan / pr66314.c
blob956e5d34faea7bf9666c0ecfef750a0f32cc1a92
1 /* { dg-do compile } */
2 /* { dg-options "-std=gnu89 -fprofile-arcs -fno-sanitize=all -fsanitize=kernel-address" } */
3 /* { dg-skip-if "" { *-*-* } { "*" } { "-Os" } } */
5 char *a;
6 int d;
8 static int
9 fn1 (int b, int c)
11 while (a)
12 if (*a)
13 return -126;
14 if (b)
15 return -12;
16 if (c == -12)
17 return c;
20 void
21 fn2 (int b, int c)
23 for (;;)
25 d = fn1 (b, c);
26 switch (d)
28 case -126:
29 continue;
30 default:
31 return;