Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / c-c++-common / diagnostic-format-sarif-file-bad-utf8-pr109098-3.c
blobead03a52fd6d7e390d716e4408f3d52c2e7215c6
1 /* Adapted from cpp/Winvalid-utf8-1.c
3 P2295R6 - Support for UTF-8 as a portable source file encoding
4 This test intentionally contains various byte sequences which are not valid UTF-8
5 { dg-do preprocess }
6 { dg-options "-finput-charset=UTF-8 -Winvalid-utf8 -fdiagnostics-format=sarif-file" } */
8 // a€߿ࠀ퟿𐀀􏿿a
9 // a€a
10 // a¿a
11 // aÀa
12 // aÁa
13 // aõa
14 // aÿa
15 // aÂa
16 // aàa
17 // aà€¿a
18 // aàŸ€a
19 // aà¿a
20 // aì€a
21 // aa
22 // að€€€a
23 // a�a
24 // aa
25 // a
26 /* a€߿ࠀ퟿𐀀􏿿a */
27 /* a€a */
28 /* a¿a */
29 /* aÀa */
30 /* aÁa */
31 /* aõa */
32 /* aÿa */
33 /* aÂa */
34 /* aàa */
35 /* aà€¿a */
36 /* aàŸ€a */
37 /* aà¿a */
38 /* aì€a */
39 /* aa */
40 /* að€€€a */
41 /* a�a */
42 /* aa */
43 /* aa */
47 /* Verify that we generate a valid UTF-8 .sarif file.
49 { dg-final { verify-sarif-file } }
51 Verify that we captured the expected warnings.
53 { dg-final { scan-sarif-file "\"results\": \\\[" } }
54 { dg-final { scan-sarif-file "\"level\": \"warning\"" } }
55 { dg-final { scan-sarif-file "\"ruleId\": \"-Winvalid-utf8\"" } }
56 { dg-final { scan-sarif-file "\"message\": " } }
57 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <80>"} } }
58 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <bf>"} } }
59 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <c0>"} } }
60 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <c1>"} } }
61 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <f5>"} } }
62 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <ff>"} } }
63 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <c2>"} } }
64 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <e0>"} } }
65 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <e0><80><bf>"} } }
66 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <e0><9f><80>"} } }
67 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <e0><bf>"} } }
68 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <ec><80>"} } }
69 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <ed><a0><80>"} } }
70 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <f0><80><80><80>"} } }
71 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <f0><8f><bf><bf>"} } }
72 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <f4><90><80><80>"} } }
73 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <fd><bf><bf><bf>"} } }
74 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <bf>"} } }
75 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <bf>"} } }
76 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <80>"} } }
77 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <bf>"} } }
78 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <c0>"} } }
79 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <c1>"} } }
80 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <f5>"} } }
81 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <ff>"} } }
82 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <c2>"} } }
83 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <e0>"} } }
84 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <e0><80><bf>"} } }
85 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <e0><9f><80>"} } }
86 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <e0><bf>"} } }
87 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <ec><80>"} } }
88 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <ed><a0><80>"} } }
89 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <f0><80><80><80>"} } }
90 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <f0><8f><bf><bf>"} } }
91 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <f4><90><80><80>"} } }
92 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <fd><bf><bf><bf>"} } }
93 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <bf>"} } }
94 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <bf>"} } }