middle-end: Fix stalled swapped condition code value [PR115836]
[official-gcc.git] / gcc / testsuite / c-c++-common / analyzer / malloc-sarif-1.c
blob19ac89f2b67cb2986a6e7e746d69bfedb3636454
1 /* { dg-do compile } */
2 /* { dg-additional-options " -fno-diagnostics-json-formatting -fdiagnostics-format=sarif-file" } */
4 #include <stdlib.h>
6 void test_1 (void)
8 void *ptr = malloc (1024);
9 free (ptr);
10 free (ptr);
13 /* Verify SARIF output.
15 { dg-final { verify-sarif-file } }
17 The threadFlowLocation objects should have "kinds" properties
18 reflecting the meanings of the events:
19 { dg-final { scan-sarif-file "\"kinds\": \\\[\"acquire\", \"memory\"\\\]" } }
20 { dg-final { scan-sarif-file "\"kinds\": \\\[\"release\", \"memory\"\\\]" } }
21 { dg-final { scan-sarif-file "\"kinds\": \\\[\"danger\"\\\]" } }