testsuite: Skip analyzer tests on AIX.
[official-gcc.git] / gcc / testsuite / c-c++-common / analyzer / infinite-loop-doom-d_main-IdentifyVersion.c
blob166d6da11f9586ebbc18e22a6be8118ca084a488
1 /* Reduced from a -Wanalyzer-infinite-loop false positive seen in Doom's
2 d_main.c, which is under the GPLv2 or later. */
4 extern char* wadfiles[20];
6 void
7 D_AddFile(const char* file)
9 int numwadfiles;
10 char* newfile;
12 for (numwadfiles = 0; wadfiles[numwadfiles]; numwadfiles++) /* { dg-bogus "infinite loop" } */
15 newfile = (char *)__builtin_malloc(__builtin_strlen(file) + 1);
16 __builtin_strcpy(newfile, file); /* { dg-warning "possibly-NULL" } */
18 wadfiles[numwadfiles] = newfile;
21 void
22 IdentifyVersion(void)
24 D_AddFile("doom1.wad");
25 D_AddFile("data_se/texture1.lmp");