testsuite: Skip analyzer tests on AIX.
[official-gcc.git] / gcc / testsuite / c-c++-common / analyzer / out-of-bounds-diagram-1-sarif.c
blob051a1ceb46386520732574374f20b58e3b38d1d4
1 /* We require -fdiagnostics-text-art-charset= to get any text art here
2 because of the test suite using -fdiagnostics-plain-output. */
4 /* { dg-additional-options "-fdiagnostics-format=sarif-file -fdiagnostics-text-art-charset=ascii" } */
6 #include <stdint.h>
8 int32_t arr[10];
10 void int_arr_write_element_after_end_off_by_one(int32_t x)
12 arr[10] = x;
15 /* Verify that some JSON was written to a file with the expected name.
17 { dg-final { verify-sarif-file } }
19 Expect the "alt-text" to be captured.
20 { dg-final { scan-sarif-file "\"text\": \"Diagram visualizing the predicted out-of-bounds access\"," } }
22 Expect the diagram to have 4 leading spaces (to indicate a code block),
23 and that at least part of the diagram was written out.
24 { dg-final { scan-sarif-file "\"markdown\": \" .*capacity: 40 bytes.*\"" } } */