testsuite: Skip analyzer tests on AIX.
[official-gcc.git] / gcc / testsuite / c-c++-common / analyzer / infinite-loop-2.c
blobf2825d606faf4c211a7208b61c8a5942766aa3d5
1 extern int do_stuff (void);
3 /* Various misleading "while" loops that look like do-whiles due
4 to proximity to another clause, but are actually empty. */
6 void not_a_do_while_1 (int flag)
8 if (flag) {
9 do_stuff ();
10 flag = 0;
11 } while (flag); // TODO: should we complain here?
14 void not_a_do_while_2 (int flag)
16 if (!flag) {
17 do_stuff ();
18 flag = 1;
19 } while (flag); // TODO: should we complain here?
22 void not_a_do_while_3 (int flag)
24 while (!flag) {
25 flag = do_stuff ();
26 } while (flag); // TODO: should we complain here?
29 void not_a_do_while_4 (int flag)
31 while (flag) {
32 flag = do_stuff ();
33 } while (flag); // TODO: should we complain here?