Skip to content

Commit 5540871

Browse files
committed
C++: Accept sign analysis test changes
The IR now contains extra loads that need to be accounted for.
1 parent 5036135 commit 5540871

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

cpp/ql/test/experimental/library-tests/rangeanalysis/signanalysis/SignAnalysis.expected

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
| bounded_bounds.c:16:12:16:12 | Load: x | negative strictlyNegative |
1414
| bounded_bounds.c:16:12:16:12 | Store: x | negative strictlyNegative |
1515
| inline_assembly.c:9:23:9:23 | Uninitialized: definition of y | positive |
16+
| inline_assembly.c:10:3:10:7 | Load: ... = ... | positive strictlyPositive |
1617
| inline_assembly.c:10:3:10:7 | Store: ... = ... | positive strictlyPositive |
1718
| inline_assembly.c:10:7:10:7 | Constant: (unsigned int)... | positive strictlyPositive |
1819
| inline_assembly.c:12:32:12:32 | Load: y | positive strictlyPositive |
@@ -26,8 +27,10 @@
2627
| minmax.c:18:37:18:37 | Load: x | positive strictlyPositive |
2728
| minmax.c:18:40:18:40 | Load: y | positive strictlyPositive |
2829
| minmax.c:18:43:18:43 | Load: z | positive strictlyPositive |
30+
| minmax.c:20:2:24:3 | Load: ... = ... | positive |
2931
| minmax.c:20:2:24:3 | Store: ... = ... | positive |
3032
| minmax.c:20:6:24:3 | CopyValue: (statement expression) | positive |
33+
| minmax.c:22:18:22:22 | Load: ... = ... | positive strictlyPositive |
3134
| minmax.c:22:18:22:22 | Store: ... = ... | positive strictlyPositive |
3235
| minmax.c:22:22:22:22 | Load: x | positive strictlyPositive |
3336
| minmax.c:23:3:23:3 | Load: t | positive |
@@ -36,13 +39,15 @@
3639
| minmax.c:26:40:26:40 | Load: y | positive strictlyPositive |
3740
| minmax.c:26:43:26:43 | Load: z | positive |
3841
| test.c:7:10:7:10 | Phi: p | positive |
42+
| test.c:8:5:8:19 | Load: ... = ... | positive strictlyPositive |
3943
| test.c:8:5:8:19 | Store: ... = ... | positive strictlyPositive |
4044
| test.c:8:13:8:17 | Load: count | positive |
4145
| test.c:8:13:8:19 | Add: ... + ... | positive strictlyPositive |
4246
| test.c:8:19:8:19 | Constant: 1 | positive strictlyPositive |
4347
| test.c:10:10:10:14 | Load: count | positive |
4448
| test.c:10:10:10:14 | Store: count | positive |
4549
| test.c:15:10:15:10 | Phi: p | positive |
50+
| test.c:16:5:16:26 | Load: ... = ... | positive |
4651
| test.c:16:5:16:26 | Store: ... = ... | positive |
4752
| test.c:16:13:16:26 | Rem: ... % ... | positive |
4853
| test.c:16:14:16:18 | Load: count | positive |
@@ -56,6 +61,7 @@
5661
| test.c:24:5:24:11 | Add: ... ++ | positive strictlyPositive |
5762
| test.c:24:5:24:11 | Constant: ... ++ | positive strictlyPositive |
5863
| test.c:24:5:24:11 | Store: ... ++ | positive strictlyPositive |
64+
| test.c:25:5:25:22 | Load: ... = ... | positive |
5965
| test.c:25:5:25:22 | Store: ... = ... | positive |
6066
| test.c:25:13:25:17 | Load: count | positive strictlyPositive |
6167
| test.c:25:13:25:22 | Rem: ... % ... | positive |
@@ -66,12 +72,14 @@
6672
| test.c:33:15:33:15 | Phi: i | positive |
6773
| test.c:33:15:33:15 | Phi: i | positive |
6874
| test.c:33:19:33:19 | Constant: 2 | positive strictlyPositive |
75+
| test.c:33:22:33:28 | Load: ... = ... | positive strictlyPositive |
6976
| test.c:33:22:33:28 | Store: ... = ... | positive strictlyPositive |
7077
| test.c:33:26:33:26 | Load: i | positive |
7178
| test.c:33:26:33:28 | Add: ... + ... | positive strictlyPositive |
7279
| test.c:33:28:33:28 | Constant: 1 | positive strictlyPositive |
7380
| test.c:34:5:34:9 | Load: total | positive |
7481
| test.c:34:5:34:14 | Add: ... += ... | positive |
82+
| test.c:34:5:34:14 | Load: ... += ... | positive |
7583
| test.c:34:5:34:14 | Store: ... += ... | positive |
7684
| test.c:34:14:34:14 | Load: i | positive |
7785
| test.c:36:10:36:14 | Load: total | positive |
@@ -88,6 +96,7 @@
8896
| test.c:42:22:42:24 | Store: ... ++ | positive strictlyPositive |
8997
| test.c:43:5:43:9 | Load: total | positive |
9098
| test.c:43:5:43:14 | Add: ... += ... | positive |
99+
| test.c:43:5:43:14 | Load: ... += ... | positive |
91100
| test.c:43:5:43:14 | Store: ... += ... | positive |
92101
| test.c:43:14:43:14 | Load: i | positive |
93102
| test.c:45:10:45:14 | Load: total | positive |
@@ -100,12 +109,14 @@
100109
| test.c:51:15:51:17 | Add: ... + ... | positive strictlyPositive |
101110
| test.c:51:17:51:17 | Constant: 2 | positive strictlyPositive |
102111
| test.c:51:21:51:21 | Constant: 4 | positive strictlyPositive |
112+
| test.c:51:24:51:30 | Load: ... = ... | positive strictlyPositive |
103113
| test.c:51:24:51:30 | Store: ... = ... | positive strictlyPositive |
104114
| test.c:51:28:51:28 | Load: i | positive |
105115
| test.c:51:28:51:30 | Add: ... + ... | positive strictlyPositive |
106116
| test.c:51:30:51:30 | Constant: 1 | positive strictlyPositive |
107117
| test.c:52:5:52:9 | Load: total | positive |
108118
| test.c:52:5:52:14 | Add: ... += ... | positive |
119+
| test.c:52:5:52:14 | Load: ... += ... | positive |
109120
| test.c:52:5:52:14 | Store: ... += ... | positive |
110121
| test.c:52:14:52:14 | Load: i | positive |
111122
| test.c:54:10:54:14 | Load: total | positive |
@@ -152,6 +163,7 @@
152163
| test.c:126:31:126:43 | Store: call to test12_helper | positive |
153164
| test.c:127:6:127:10 | Load: Start | positive |
154165
| test.c:127:6:127:24 | Add: ... += ... | positive strictlyPositive |
166+
| test.c:127:6:127:24 | Load: ... += ... | positive strictlyPositive |
155167
| test.c:127:6:127:24 | Store: ... += ... | positive strictlyPositive |
156168
| test.c:127:15:127:20 | Load: Length | positive |
157169
| test.c:127:15:127:24 | Add: ... + ... | positive strictlyPositive |
@@ -243,6 +255,7 @@
243255
| test.c:201:13:201:15 | Store: ... * ... | positive strictlyPositive |
244256
| test.c:201:15:201:15 | Load: b | positive strictlyPositive |
245257
| test.c:202:5:202:14 | Add: ... += ... | positive strictlyPositive |
258+
| test.c:202:5:202:14 | Load: ... += ... | positive strictlyPositive |
246259
| test.c:202:5:202:14 | Store: ... += ... | positive strictlyPositive |
247260
| test.c:202:14:202:14 | Load: r | positive strictlyPositive |
248261
| test.c:204:7:204:7 | Constant: 3 | positive strictlyPositive |
@@ -257,6 +270,7 @@
257270
| test.c:205:15:205:15 | Load: b | positive |
258271
| test.c:206:5:206:9 | Load: total | positive |
259272
| test.c:206:5:206:14 | Add: ... += ... | positive |
273+
| test.c:206:5:206:14 | Load: ... += ... | positive |
260274
| test.c:206:5:206:14 | Store: ... += ... | positive |
261275
| test.c:206:14:206:14 | Load: r | positive |
262276
| test.c:208:7:208:7 | Constant: 3 | positive strictlyPositive |
@@ -296,6 +310,7 @@
296310
| test.c:229:13:229:15 | Store: ... * ... | positive |
297311
| test.c:229:15:229:15 | Load: b | positive strictlyPositive |
298312
| test.c:230:5:230:14 | Add: ... += ... | positive |
313+
| test.c:230:5:230:14 | Load: ... += ... | positive |
299314
| test.c:230:5:230:14 | Store: ... += ... | positive |
300315
| test.c:230:14:230:14 | Load: r | positive |
301316
| test.c:232:7:232:7 | Phi: 0 | positive |
@@ -309,6 +324,7 @@
309324
| test.c:233:15:233:15 | Load: b | positive |
310325
| test.c:234:5:234:9 | Load: total | positive |
311326
| test.c:234:5:234:14 | Add: ... += ... | positive |
327+
| test.c:234:5:234:14 | Load: ... += ... | positive |
312328
| test.c:234:5:234:14 | Store: ... += ... | positive |
313329
| test.c:234:14:234:14 | Load: r | positive |
314330
| test.c:236:7:236:7 | Phi: 0 | positive |
@@ -368,6 +384,7 @@
368384
| test.c:285:13:285:15 | Store: ... * ... | negative |
369385
| test.c:285:15:285:15 | Load: b | positive strictlyPositive |
370386
| test.c:286:5:286:14 | Add: ... += ... | negative |
387+
| test.c:286:5:286:14 | Load: ... += ... | negative |
371388
| test.c:286:5:286:14 | Store: ... += ... | negative |
372389
| test.c:286:14:286:14 | Load: r | negative |
373390
| test.c:288:7:288:9 | Constant: - ... | negative strictlyNegative |
@@ -380,6 +397,7 @@
380397
| test.c:289:15:289:15 | Load: b | positive |
381398
| test.c:290:5:290:9 | Load: total | negative |
382399
| test.c:290:5:290:14 | Add: ... += ... | negative |
400+
| test.c:290:5:290:14 | Load: ... += ... | negative |
383401
| test.c:290:5:290:14 | Store: ... += ... | negative |
384402
| test.c:290:14:290:14 | Load: r | negative |
385403
| test.c:292:7:292:9 | Constant: - ... | negative strictlyNegative |
@@ -413,6 +431,7 @@
413431
| test.c:313:13:313:15 | Store: ... * ... | negative strictlyNegative |
414432
| test.c:313:15:313:15 | Load: b | positive strictlyPositive |
415433
| test.c:314:5:314:14 | Add: ... += ... | negative strictlyNegative |
434+
| test.c:314:5:314:14 | Load: ... += ... | negative strictlyNegative |
416435
| test.c:314:5:314:14 | Store: ... += ... | negative strictlyNegative |
417436
| test.c:314:14:314:14 | Load: r | negative strictlyNegative |
418437
| test.c:316:7:316:9 | Constant: - ... | negative strictlyNegative |
@@ -426,6 +445,7 @@
426445
| test.c:317:15:317:15 | Load: b | positive |
427446
| test.c:318:5:318:9 | Load: total | negative |
428447
| test.c:318:5:318:14 | Add: ... += ... | negative |
448+
| test.c:318:5:318:14 | Load: ... += ... | negative |
429449
| test.c:318:5:318:14 | Store: ... += ... | negative |
430450
| test.c:318:14:318:14 | Load: r | negative |
431451
| test.c:320:7:320:9 | Constant: - ... | negative strictlyNegative |
@@ -461,6 +481,7 @@
461481
| test.c:343:5:343:7 | Add: ... ++ | positive strictlyPositive |
462482
| test.c:343:5:343:7 | Constant: ... ++ | positive strictlyPositive |
463483
| test.c:343:5:343:7 | Store: ... ++ | positive strictlyPositive |
484+
| test.c:345:3:345:7 | Load: ... = ... | positive strictlyPositive |
464485
| test.c:345:3:345:7 | Store: ... = ... | positive strictlyPositive |
465486
| test.c:345:7:345:7 | Load: i | positive strictlyPositive |
466487
| test.c:346:7:346:7 | Load: x | positive |
@@ -476,6 +497,7 @@
476497
| test.c:356:36:356:37 | Uninitialized: definition of y6 | positive |
477498
| test.c:356:40:356:41 | Uninitialized: definition of y7 | positive |
478499
| test.c:356:44:356:45 | Uninitialized: definition of y8 | positive |
500+
| test.c:357:3:357:23 | Load: ... = ... | positive |
479501
| test.c:357:3:357:23 | Store: ... = ... | positive |
480502
| test.c:357:8:357:8 | Load: x | positive |
481503
| test.c:357:8:357:23 | Load: ... ? ... : ... | positive |
@@ -485,6 +507,7 @@
485507
| test.c:357:12:357:14 | Constant: (unsigned int)... | positive strictlyPositive |
486508
| test.c:357:18:357:18 | Load: x | positive |
487509
| test.c:357:22:357:23 | Constant: (unsigned int)... | positive strictlyPositive |
510+
| test.c:358:3:358:24 | Load: ... = ... | positive |
488511
| test.c:358:3:358:24 | Store: ... = ... | positive |
489512
| test.c:358:8:358:8 | Load: x | positive |
490513
| test.c:358:8:358:24 | Load: ... ? ... : ... | positive |
@@ -496,20 +519,23 @@
496519
| test.c:358:24:358:24 | Load: x | positive |
497520
| test.c:365:7:365:7 | Load: x | positive |
498521
| test.c:365:11:365:13 | Constant: (unsigned int)... | positive strictlyPositive |
522+
| test.c:366:5:366:15 | Load: ... = ... | positive |
499523
| test.c:366:5:366:15 | Store: ... = ... | positive |
500524
| test.c:366:10:366:10 | Load: x | positive |
501525
| test.c:366:10:366:15 | Load: ... ? ... : ... | positive |
502526
| test.c:366:10:366:15 | Phi: ... ? ... : ... | positive |
503527
| test.c:366:10:366:15 | Store: ... ? ... : ... | positive |
504528
| test.c:366:10:366:15 | Store: ... ? ... : ... | positive strictlyPositive |
505529
| test.c:366:15:366:15 | Constant: (unsigned int)... | positive strictlyPositive |
530+
| test.c:367:5:367:17 | Load: ... = ... | positive |
506531
| test.c:367:5:367:17 | Store: ... = ... | positive |
507532
| test.c:367:10:367:10 | Load: x | positive |
508533
| test.c:367:10:367:17 | Load: ... ? ... : ... | positive |
509534
| test.c:367:10:367:17 | Phi: ... ? ... : ... | positive |
510535
| test.c:367:10:367:17 | Store: ... ? ... : ... | positive |
511536
| test.c:367:10:367:17 | Store: ... ? ... : ... | positive strictlyPositive |
512537
| test.c:367:15:367:17 | Constant: (unsigned int)... | positive strictlyPositive |
538+
| test.c:368:5:368:21 | Load: ... = ... | positive strictlyPositive |
513539
| test.c:368:5:368:21 | Store: ... = ... | positive strictlyPositive |
514540
| test.c:368:10:368:21 | Load: ... ? ... : ... | positive strictlyPositive |
515541
| test.c:368:10:368:21 | Phi: ... ? ... : ... | positive strictlyPositive |
@@ -519,6 +545,7 @@
519545
| test.c:368:11:368:13 | Add: ... + ... | positive strictlyPositive |
520546
| test.c:368:13:368:13 | Constant: (unsigned int)... | positive strictlyPositive |
521547
| test.c:368:19:368:21 | Constant: (unsigned int)... | positive strictlyPositive |
548+
| test.c:369:5:369:36 | Load: ... = ... | positive |
522549
| test.c:369:5:369:36 | Store: ... = ... | positive |
523550
| test.c:369:10:369:36 | Convert: (unsigned int)... | positive |
524551
| test.c:369:10:369:36 | Load: ... ? ... : ... | positive |
@@ -530,6 +557,7 @@
530557
| test.c:369:27:369:29 | Add: ... + ... | positive strictlyPositive |
531558
| test.c:369:29:369:29 | Constant: (unsigned int)... | positive strictlyPositive |
532559
| test.c:369:36:369:36 | Constant: 5 | positive strictlyPositive |
560+
| test.c:370:5:370:38 | Load: ... = ... | positive |
533561
| test.c:370:5:370:38 | Store: ... = ... | positive |
534562
| test.c:370:10:370:38 | Convert: (unsigned int)... | positive |
535563
| test.c:370:10:370:38 | Load: ... ? ... : ... | positive |
@@ -541,6 +569,7 @@
541569
| test.c:370:27:370:29 | Add: ... + ... | positive strictlyPositive |
542570
| test.c:370:29:370:29 | Constant: (unsigned int)... | positive strictlyPositive |
543571
| test.c:370:36:370:38 | Constant: 500 | positive strictlyPositive |
572+
| test.c:371:5:371:39 | Load: ... = ... | positive |
544573
| test.c:371:5:371:39 | Store: ... = ... | positive |
545574
| test.c:371:10:371:39 | Convert: (unsigned int)... | positive |
546575
| test.c:371:10:371:39 | Load: ... ? ... : ... | positive |
@@ -580,6 +609,7 @@
580609
| test.c:378:24:378:25 | Uninitialized: definition of y3 | positive |
581610
| test.c:378:28:378:29 | Uninitialized: definition of y4 | positive |
582611
| test.c:378:32:378:33 | Uninitialized: definition of y5 | positive |
612+
| test.c:379:3:379:24 | Load: ... = ... | positive strictlyPositive |
583613
| test.c:379:3:379:24 | Store: ... = ... | positive strictlyPositive |
584614
| test.c:379:8:379:8 | Load: x | positive |
585615
| test.c:379:8:379:24 | Load: ... ? ... : ... | positive strictlyPositive |
@@ -589,6 +619,7 @@
589619
| test.c:379:12:379:14 | Constant: (unsigned int)... | positive strictlyPositive |
590620
| test.c:379:18:379:18 | Load: x | positive strictlyPositive |
591621
| test.c:379:22:379:24 | Constant: (unsigned int)... | positive strictlyPositive |
622+
| test.c:380:3:380:25 | Load: ... = ... | positive strictlyPositive |
592623
| test.c:380:3:380:25 | Store: ... = ... | positive strictlyPositive |
593624
| test.c:380:8:380:8 | Load: x | positive |
594625
| test.c:380:8:380:25 | Load: ... ? ... : ... | positive strictlyPositive |
@@ -598,14 +629,18 @@
598629
| test.c:380:13:380:15 | Constant: (unsigned int)... | positive strictlyPositive |
599630
| test.c:380:19:380:21 | Constant: (unsigned int)... | positive strictlyPositive |
600631
| test.c:380:25:380:25 | Load: x | positive strictlyPositive |
632+
| test.c:381:3:381:11 | Load: ... = ... | positive strictlyPositive |
601633
| test.c:381:3:381:11 | Store: ... = ... | positive strictlyPositive |
602634
| test.c:381:8:381:11 | Constant: (unsigned int)... | positive strictlyPositive |
635+
| test.c:382:3:382:11 | Load: ... = ... | positive strictlyPositive |
603636
| test.c:382:3:382:11 | Store: ... = ... | positive strictlyPositive |
604637
| test.c:382:8:382:11 | Constant: (unsigned int)... | positive strictlyPositive |
638+
| test.c:383:3:383:11 | Load: ... = ... | positive strictlyPositive |
605639
| test.c:383:3:383:11 | Store: ... = ... | positive strictlyPositive |
606640
| test.c:383:8:383:11 | Constant: (unsigned int)... | positive strictlyPositive |
607641
| test.c:384:7:384:7 | Load: x | positive |
608642
| test.c:384:12:384:14 | Constant: (unsigned int)... | positive strictlyPositive |
643+
| test.c:385:5:385:21 | Load: ... = ... | positive |
609644
| test.c:385:5:385:21 | Store: ... = ... | positive |
610645
| test.c:385:10:385:21 | Load: ... ? ... : ... | positive |
611646
| test.c:385:10:385:21 | Phi: ... ? ... : ... | positive |
@@ -615,6 +650,7 @@
615650
| test.c:385:11:385:15 | Sub: ... - ... | positive |
616651
| test.c:385:13:385:15 | Constant: (unsigned int)... | positive strictlyPositive |
617652
| test.c:385:21:385:21 | Constant: (unsigned int)... | positive strictlyPositive |
653+
| test.c:386:5:386:21 | Load: ... = ... | positive |
618654
| test.c:386:5:386:21 | Store: ... = ... | positive |
619655
| test.c:386:10:386:21 | Load: ... ? ... : ... | positive |
620656
| test.c:386:10:386:21 | Phi: ... ? ... : ... | positive |
@@ -624,6 +660,7 @@
624660
| test.c:386:11:386:15 | Sub: ... - ... | positive |
625661
| test.c:386:13:386:15 | Constant: (unsigned int)... | positive strictlyPositive |
626662
| test.c:386:21:386:21 | Constant: (unsigned int)... | positive strictlyPositive |
663+
| test.c:387:5:387:38 | Load: ... = ... | positive |
627664
| test.c:387:5:387:38 | Store: ... = ... | positive |
628665
| test.c:387:10:387:38 | Convert: (unsigned int)... | positive |
629666
| test.c:387:10:387:38 | Load: ... ? ... : ... | positive |
@@ -660,13 +697,16 @@
660697
| test.c:394:34:394:36 | Constant: (unsigned int)... | positive strictlyPositive |
661698
| test.c:395:16:395:17 | Uninitialized: definition of y1 | positive |
662699
| test.c:396:16:396:17 | Uninitialized: definition of y2 | positive |
700+
| test.c:397:3:397:15 | Load: ... = ... | positive strictlyPositive |
663701
| test.c:397:3:397:15 | Store: ... = ... | positive strictlyPositive |
664702
| test.c:397:9:397:11 | Add: ++ ... | positive strictlyPositive |
665703
| test.c:397:9:397:11 | Constant: ++ ... | positive strictlyPositive |
704+
| test.c:397:9:397:11 | Load: ++ ... | positive strictlyPositive |
666705
| test.c:397:9:397:11 | Store: ++ ... | positive strictlyPositive |
667706
| test.c:397:9:397:14 | CopyValue: ... , ... | positive strictlyPositive |
668707
| test.c:397:11:397:11 | Load: y | positive |
669708
| test.c:397:14:397:14 | Load: y | positive strictlyPositive |
709+
| test.c:398:3:398:23 | Load: ... = ... | positive strictlyPositive |
670710
| test.c:398:3:398:23 | Store: ... = ... | positive strictlyPositive |
671711
| test.c:398:9:398:9 | Load: y | positive strictlyPositive |
672712
| test.c:398:9:398:11 | Add: ... ++ | positive strictlyPositive |
@@ -675,6 +715,7 @@
675715
| test.c:398:9:398:22 | CopyValue: ... , ... | positive strictlyPositive |
676716
| test.c:398:14:398:14 | Load: y | positive strictlyPositive |
677717
| test.c:398:14:398:19 | Add: ... += ... | positive strictlyPositive |
718+
| test.c:398:14:398:19 | Load: ... += ... | positive strictlyPositive |
678719
| test.c:398:14:398:19 | Store: ... += ... | positive strictlyPositive |
679720
| test.c:398:19:398:19 | Constant: (unsigned int)... | positive strictlyPositive |
680721
| test.c:398:22:398:22 | Load: y | positive strictlyPositive |

0 commit comments

Comments
 (0)