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];
7 D_AddFile(const char* file
)
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
;
24 D_AddFile("doom1.wad");
25 D_AddFile("data_se/texture1.lmp");