Debian Codegraph @

gcc/testsuite/gdc.dg/gcov1.d

raw
1 /* { dg-options "-fcondition-coverage -ftest-coverage" } */
2 /* { dg-do run { target native } } */
3
4 /* Some side effect to stop branches from being pruned. */
5 int x = 0;
6
7 int id (int x) { return x; }
8 int inv (int x) { return !x; }
9
10 /* || works. */
11 void
12 mcdc001a (int a, int b)
13 {
14 if (a || b) /* conditions(1/4) true(0) false(0 1) */
15 /* conditions(end) */
16 x = 1;
17 else
18 x = 2;
19 }
20
21 void
22 mcdc001b (int a, int b)
23 {
24 if (a || b) /* conditions(3/4) true(0) */
25 /* conditions(end) */
26 x = 1;
27 else
28 x = 2;
29 }
30
31 void
32 mcdc001c (int a, int b)
33 {
34 if (a || b) /* conditions(4/4) */
35 x = 1;
36 else
37 x = 2;
38 }
39
40 void
41 mcdc001d (int a, int b, int c)
42 {
43 if (a || b || c) /* conditions(2/6) false(0 1 2) true(2) */
44 /* conditions(end) */
45 x = 1;
46 }
47
48 /* && works */
49 void
50 mcdc002a (int a, int b)
51 {
52 if (a && b) /* conditions(1/4) true(0 1) false(0) */
53 /* conditions(end) */
54 x = 1;
55 else
56 x = 2;
57 }
58
59 void
60 mcdc002b (int a, int b)
61 {
62 if (a && b) /* conditions(3/4) false(0) */
63 /* conditions(end) */
64 x = 1;
65 else
66 x = 2;
67 }
68
69 void
70 mcdc002c (int a, int b)
71 {
72 if (a && b) /* conditions(4/4) */
73 x = 1;
74 else
75 x = 2;
76 }
77
78 void
79 mcdc002d (int a, int b, int c)
80 {
81 if (a && b && c) /* conditions(4/6) false(0 2) */
82 /* conditions(end) */
83 x = 1;
84 }
85
86 /* Negation works. */
87 void
88 mcdc003a (int a, int b)
89 {
90 if (!a || !b) /* conditions(2/4) false(0 1) */
91 /* conditions(end) */
92 x = 1;
93 else
94 x = 2;
95 }
96
97 /* Single conditionals with and without else. */
98 void
99 mcdc004a (int a)
100 {
101 if (a) /* conditions(1/2) true(0) */
102 /* conditions(end) */
103 x = 1;
104 else
105 x = 2;
106 }
107
108 void
109 mcdc004b (int a)
110 {
111 if (a) /* conditions(2/2) */
112 x = 1;
113 else
114 x = 2;
115 }
116
117 void
118 mcdc004c (int a)
119 {
120 if (a) /* conditions(1/2) false(0) */
121 /* conditions(end) */
122 x = 1;
123 }
124
125 void
126 mcdc004d (int a, int b, int c)
127 {
128 if (a) /* conditions(2/2) */
129 {
130 if (b || c) /* conditions(1/4) true(1) false(0 1) */
131 x = a + b + c;
132 }
133 }
134
135 void
136 mcdc004e (int a, int b, int c)
137 {
138 if (a) /* conditions(2/2) */
139 {
140 if (b || c) /* conditions(1/4) true(1) false(0 1) */
141 /* conditions(end) */
142 x = a + b + c;
143 }
144 else
145 {
146 x = c;
147 }
148 }
149
150 void
151 mcdc004f (int a, int b, int c)
152 {
153 if (a) /* conditions(1/2) false(0) */
154 /* conditions(end) */
155 {
156 x = 1;
157 }
158 else if (b) /* conditions(0/2) true(0) false(0) */
159 /* conditions(end) */
160 {
161 x = 2;
162 if (c) /* conditions(0/2) true(0) false(0) */
163 /* conditions(end) */
164 x = 3;
165 }
166 }
167
168 /* Mixing && and || works. */
169 void
170 mcdc005a (int a, int b, int c)
171 {
172 if ((a && b) || c) /* conditions(1/6) true(0 1) false(0 1 2) */
173 /* conditions(end) */
174 x = 1;
175 else
176 x = 2;
177 }
178
179 void
180 mcdc005b (int a, int b, int c, int d)
181 {
182 /* This is where masking MC/DC gets unintuitive:
183
184 1 1 0 0 => covers 1 (d = 0) as && 0 masks everything to the left
185 1 0 0 0 => covers 2 (b = 0, c = 0) as (a && 0) masks a and d is never
186 evaluated. */
187 if ((a && (b || c)) && d) /* conditions(3/8) true(0 1 2 3) false(0) */
188 /* conditions(end) */
189 x = 1;
190 else
191 x = 2;
192 }
193
194 void
195 mcdc005c (int a, int b, int c, int d)
196 {
197 if (a || (b && c) || d) /* conditions(2/8) true(0 3) false(0 1 2 3) */
198 /* conditions(end) */
199 x = a + b + c + d;
200 }
201
202 void
203 mcdc005d (int a, int b, int c, int d)
204 {
205 /* This test is quite significant - it has a single input
206 (1, 0, 0, 0) and tests specifically for when a multi-term left operand
207 is masked. d = 0 should mask a || b and for the input there are no other
208 sources for masking a (since b = 0). */
209 if ((a || b) && (c || d)) /* conditions(2/8) true(0 1 2 3) false(0 1) */
210 /* conditions(end) */
211 x = a + b;
212 else
213 x = c + d;
214 }
215
216 /* Mixing in constants kills the decision removes the term outright. */
217 void
218 mcdc005e (int a, int b)
219 {
220 x += 0 && a;
221 x += a && 1;
222 x += 0 && a && b;
223 x += a && 1 && b; /* conditions(4/4) */
224 x += a && b && 0;
225 x += 0 && 1;
226 x += 1 && a;
227 x += a && 0;
228 x += 1 || a;
229 x += a || 0;
230 x += 1 || a || b;
231 x += a || 0 || b; /* conditions(4/4) */
232 x += a || b || 1;
233 x += 1 || 0;
234 x += 0 || a;
235 x += a || 1;
236 }
237
238 /* Nested conditionals. */
239 void
240 mcdc006a (int a, int b, int c, int d, int e)
241 {
242 if (a) /* conditions(2/2) */
243 {
244 if (b && c) /* conditions(3/4) false(1) */
245 /* conditions(end) */
246 x = 1;
247 else
248 x = 2;
249 }
250 else
251 {
252 if (c || d) /* conditions(2/4) true(0 1) */
253 /* conditions(end) */
254 x = 3;
255 else
256 x = 4;
257 }
258 }
259
260 void
261 mcdc006b (int a, int b, int c)
262 {
263 if (a) /* conditions(2/2) */
264 if (b) /* conditions(2/2) */
265 if (c) /* conditions(2/2) */
266 x = a + b + c;
267 }
268
269 void
270 mcdc006c (int a, int b, int c)
271 {
272 if (a) /* conditions(2/2) */
273 {
274 if (b) /*conditions(2/2) */
275 {
276 if (c) /* conditions(2/2) */
277 {
278 x = a + b + c;
279 }
280 }
281 else
282 {
283 x = b;
284 }
285 }
286 else
287 {
288 x = a;
289 }
290 }
291
292 void
293 mcdc006d (int a, int b, int c)
294 {
295 if (a) /* conditions(1/2) false(0) */
296 /* conditions(end) */
297 {
298 if (b) /* conditions(1/2) true(0) */
299 /* conditions(end) */
300 x = a + b;
301 if (c) /* conditions(2/2) */
302 /* conditions(end) */
303 x = a + b;
304 }
305 }
306
307 void
308 mcdc006e (int a, int b, int c, int d)
309 {
310 if ((a || b || c) && id (d)) /* conditions(4/8) true(0 1 2 3) false() */
311 /* conditions(end) */
312 x = 1;
313 }
314
315 /* else/if. */
316 void
317 mcdc007a (int a, int b, int c, int d)
318 {
319 if (a) /* conditions(2/2) */
320 {
321 if (b) /* conditions(1/2) true(0) */
322 /* conditions(end) */
323 x = 1;
324 else
325 x = 2;
326 }
327 else if (c) /* conditions(2/2) */
328 {
329 if (d) /* conditions(1/2) true(0) */
330 /* conditions(end) */
331 x = 3;
332 else
333 x = 4;
334 }
335 }
336
337 void
338 mcdc007b (int a, int b, int c)
339 {
340 goto begin;
341 then:
342 x = 1;
343 return;
344 begin:
345 if (a) /* conditions(2/2) */
346 goto then;
347 else if (b) /* conditions(2/2) */
348 goto then;
349 else if (c) /* conditions(1/2) true(0) */
350 goto then;
351 }
352
353 void
354 mcdc007c (int a, int b, int c)
355 {
356 goto begin;
357 then1:
358 x = 1;
359 return;
360 then2:
361 x = 1;
362 return;
363 then3:
364 x = 1;
365 return;
366 begin:
367 if (a) /* conditions(2/2) */
368 goto then1;
369 else if (b) /* conditions(2/2) */
370 goto then2;
371 else if (c) /* conditions(1/2) true(0) */
372 /* conditions(end) */
373 goto then3;
374 }
375
376 void
377 noop () {}
378
379 int
380 mcdc007d (int a, int b, int c, int d, int e)
381 {
382 noop ();
383 if (a) /* conditions(1/2) true(0) */
384 /* conditions(end) */
385 {
386 if (b || c) /* conditions(0/4) true(0 1) false(0 1) */
387 /* conditions(end) */
388 x = 2;
389 if (d) /* conditions(0/2) true(0) false(0) */
390 /* conditions(end) */
391 return 1;
392 }
393 if (e) /* conditions(1/2) false(0) */
394 /* conditions(end) */
395 return 0;
396
397 return 2;
398 }
399
400 /* while loop. */
401 void
402 mcdc008a (int a)
403 {
404 while (a < 10) /* conditions(2/2) */
405 x = a++;
406 }
407
408 void
409 mcdc008b (int a)
410 {
411 /* gdc inverts this check. */
412 while (a > 10) /* conditions(1/2) false(0) */
413 /* conditions(end) */
414 x = a--;
415 }
416
417 void
418 mcdc008c (int a)
419 {
420 // should work, even with no body
421 while (a) /* conditions(2/2) */
422 break;
423 }
424
425 void
426 mcdc008d (int a, int b, int c, int d)
427 {
428 /* Multi-term loop conditional. */
429 while ((a && (b || c)) && d) /* conditions(8/8) */
430 a = b = c = d = 0;
431 }
432
433 void
434 mcdc009a (int a, int b)
435 {
436 while (a > 0 && b > 0) /* conditions(3/4) true(1) */
437 /* conditions(end) */
438 x = a--;
439 }
440
441 void
442 mcdc009b (int a, int b)
443 {
444 while (a-- > 0 && b) {} /* conditions(2/4) false(0 1) */
445 /* conditions(end) */
446 }
447
448 /* for loop. */
449 void
450 mcdc010a (int a, int b)
451 {
452 for (int i = 0; i < b; i++) /* conditions(2/2) */
453 {
454 if (a < b) /* conditions(2/2) */
455 x = 1;
456 else
457 x = a += 2;
458 }
459 }
460
461 void
462 mcdc010b ()
463 {
464 for (int a = 0; a <= 1; ++a) /* conditions(2/2) */
465 {
466 x = a;
467 }
468 }
469
470 int
471 mcdc010c (int a, int b, int c)
472 {
473 for (;a || b || c;) /* conditions(4/6) false(0 2) */
474 /* conditions(end) */
475 return 1;
476 return 0;
477 }
478
479
480 int always (int x) { return 1; }
481
482 /* No-condition infinite loops. */
483 void
484 mcdc010d (int a)
485 {
486 for (;;)
487 {
488 if (always(a)) /* conditions(1/2) false(0) */
489 /* conditions(end) */
490 {
491 x = a;
492 break;
493 }
494 x += a + 1;
495 }
496 }
497
498 /* conditionals without control flow constructs work */
499 void
500 mcdc011a (int a, int b, int c)
501 {
502 x = (a && b) || c; /* conditions(5/6) false(1) */
503 /* conditions(end) */
504 }
505
506 /* Sequential expressions are handled independently. */
507 void
508 mcdc012a (int a, int b, int c)
509 {
510 if (a || b) /* conditions(3/4) true(0) */
511 /* conditions(end) */
512 x = 1;
513 else
514 x = 2;
515
516 if (c) /* conditions(2/2) */
517 x = 1;
518 }
519
520 /* Cannot ever satisfy (masking) MC/DC, even with all input combinations,
521 because not all variables independently affect the decision. */
522 void
523 mcdc013a (int a, int b, int c)
524 {
525 /* Specification: (a && b) || c
526 The implementation does not match the specification. This has branch
527 coverage, but not MC/DC. */
528 if ((a && !c) || c) /* conditions(5/6) false(1) */
529 /* conditions(end) */
530 x = 1;
531 else
532 x = 2;
533 }
534
535 void
536 mcdc014a ()
537 {
538 int[64] conds;
539 /* conditions(64/128) true(0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63) */
540 x = conds[ 0] || conds[ 1] || conds[ 2] || conds[ 3] || conds[ 4] ||
541 conds[ 5] || conds[ 6] || conds[ 7] || conds[ 8] || conds[ 9] ||
542 conds[10] || conds[11] || conds[12] || conds[13] || conds[14] ||
543 conds[15] || conds[16] || conds[17] || conds[18] || conds[19] ||
544 conds[20] || conds[21] || conds[22] || conds[23] || conds[24] ||
545 conds[25] || conds[26] || conds[27] || conds[28] || conds[29] ||
546 conds[30] || conds[31] || conds[32] || conds[33] || conds[34] ||
547 conds[35] || conds[36] || conds[37] || conds[38] || conds[39] ||
548 conds[40] || conds[41] || conds[42] || conds[43] || conds[44] ||
549 conds[45] || conds[46] || conds[47] || conds[48] || conds[49] ||
550 conds[50] || conds[51] || conds[52] || conds[53] || conds[54] ||
551 conds[55] || conds[56] || conds[57] || conds[58] || conds[59] ||
552 conds[60] || conds[61] || conds[62] || conds[63]
553 ; /* conditions(end) */
554 }
555
556 /* Early returns. */
557 void
558 mcdc015a (int a, int b)
559 {
560 if (a) /* conditions(2/2) */
561 return;
562
563 if (b) /* conditions(1/2) true(0) */
564 /* conditions(end) */
565 x = 1;
566 }
567
568 void
569 mcdc015b (int a, int b)
570 {
571 for (int i = 5; i > a; i--) /* conditions(2/2) */
572 {
573 if (i == b) /* conditions(2/2) */
574 return;
575 x = i;
576 }
577 }
578
579 void
580 mcdc015c (int a, int b)
581 {
582 for (int i = 5; i > a; i--) /* conditions(2/2) */
583 {
584 if (i == b) /* conditions(2/2) */
585 {
586 x = 0;
587 return;
588 }
589 else
590 {
591 x = 1;
592 return;
593 }
594
595 x = i;
596 }
597 }
598
599 /* Early returns, gotos. */
600 void
601 mcdc015d (int a, int b, int c)
602 {
603 if (a) return; /* conditions(1/2) false(0) */
604 /* conditions(end) */
605 if (id (b)) return; /* conditions(0/2) true(0) false(0) */
606 /* conditions(end) */
607 if (id (c)) return; /* conditions(0/2) true(0) false(0) */
608 /* conditions(end) */
609 }
610
611
612 /* Check nested loops. */
613 void
614 mcdc016a (int a, int b)
615 {
616 for (int i = 0; i < a; i++) /* conditions(2/2) */
617 for (int k = 0; k < b; k++) /* conditions(2/2) */
618 x = i + k;
619 }
620
621 void
622 mcdc016b (int a, int b)
623 {
624 for (int i = 0; i < a; i++) /* conditions(2/2) */
625 {
626 if (a > 5) /* conditions(2/2) */
627 break;
628
629 for (int k = 0; k < b; k++) /* conditions(2/2) */
630 x = i + k;
631 }
632 }
633
634 void
635 mcdc016c (int a, int b)
636 {
637 for (int i = 0; i < a; i++) /* conditions(2/2) */
638 {
639 if (a > 5) /* conditions(1/2) true(0) */
640 /* conditions(end) */
641 return;
642
643 for (int k = 0; k < b; k++) /* conditions(2/2) */
644 x = i + k;
645 }
646 }
647
648 void
649 mcdc016d (int a, int b)
650 {
651 for (int i = 0; i < a; i++) /* conditions(2/2) */
652 {
653 for (int k = 0; k < 5; k++) /* conditions(2/2) */
654 {
655 if (b > 5) /* conditions(1/2) true(0) */
656 /* conditions(end) */
657 return;
658 x = i + k;
659 }
660
661 }
662 }
663
664 /* do-while loops. */
665 void
666 mcdc017a (int a)
667 {
668 do
669 {
670 /* conditions(2/2) */
671 a--;
672 } while (a > 0);
673 }
674
675 void
676 mcdc017b (int a, int b)
677 {
678 do /* conditions(2/2) */
679 {
680 /* This call is important; it can add more nodes to the body in the
681 CFG, which changes how close exits and breaks are to the loop
682 conditional. */
683 noop ();
684 a--;
685 if (b) /* conditions(2/2) */
686 break;
687 } while (a > 0);
688 }
689
690 void
691 mcdc017c (int a, int b)
692 {
693 int left = 0;
694 int right = 0;
695 int n = a + b;
696 do
697 {
698 if (a) /* conditions(1/2) false(0) */
699 /* conditions(end) */
700 {
701 left = a > left ? b : left; /* conditions(2/2) */
702 }
703 if (b) /* conditions(1/2) false(0) */
704 /* conditions(end) */
705 {
706 right = b > right ? a : right; /* conditions(2/2) */
707 }
708 } while (n-- > 0); /* conditions(2/2) */
709 }
710
711 void
712 mcdc017d (int a, int b, int c)
713 {
714 do
715 {
716 a--; /* conditions(0/6) true(0 1 2) false(0 1 2) */
717 /* conditions(end) */
718 } while (a > 0 && b && c);
719 }
720
721 /* Collection of odd cases lifted-and-adapted from real-world code. */
722 int
723 mcdc018a (int a, int b, int c, int d, int e, int f, int g, int len)
724 {
725 int n;
726 /* adapted from zlib/gz_read */
727 do
728 {
729 n = -1;
730 if (n > len) /* conditions(2/2) */
731 n = len;
732
733 if (b) /* conditions(2/2) */
734 {
735 if (b < 5) /* conditions(2/2) */
736 x = 1;
737 noop();
738 }
739 else if (c && d) /* conditions(3/4) false(1) */
740 /* conditions(end) */
741 {
742 x = 2;
743 break;
744 }
745 else if (e || f) /* conditions(2/4) false(0 1) */
746 /* conditions(end) */
747 {
748 if (id(g)) /* conditions(2/2) */
749 return 0;
750 continue;
751 }
752 } while (a-- > 0); /* conditions(2/2) */
753
754 return 1;
755 }
756
757 void
758 mcdc018b (int a, int b, int c)
759 {
760 int n;
761 while (a) /* conditions(2/2) */
762 {
763 /* else block does not make a difference for the problem, but ensures
764 loop termination. */
765 if (b) /* conditions(2/2) */
766 n = c ? 0 : 0; // does not show up in CFG (embedded in the block)
767 else
768 n = 0;
769 a = n;
770 }
771 }
772
773 /* Adapted from zlib/compress2. */
774 void
775 mcdc018c (int a, int b)
776 {
777 int err;
778 do
779 {
780 a = inv (a);
781 err = a; /* conditions(1/2) false(0) */
782 /* conditions(end) */
783 } while (err);
784
785 a = id (a);
786 if (a) /* conditions(1/2) true(0) */
787 /* conditions(end) */
788 x *= a + 1;
789 }
790
791 /* Too many conditions, coverage gives up. */
792 void
793 mcdc019a ()
794 {
795 /* This will warn and needs a pragma warning suppression (or similar)
796 mechanism to not cause trigger a test failure from the warning.
797 int[65] conds;
798 x = conds[ 0] || conds[ 1] || conds[ 2] || conds[ 3] || conds[ 4] ||
799 conds[ 5] || conds[ 6] || conds[ 7] || conds[ 8] || conds[ 9] ||
800 conds[10] || conds[11] || conds[12] || conds[13] || conds[14] ||
801 conds[15] || conds[16] || conds[17] || conds[18] || conds[19] ||
802 conds[20] || conds[21] || conds[22] || conds[23] || conds[24] ||
803 conds[25] || conds[26] || conds[27] || conds[28] || conds[29] ||
804 conds[30] || conds[31] || conds[32] || conds[33] || conds[34] ||
805 conds[35] || conds[36] || conds[37] || conds[38] || conds[39] ||
806 conds[40] || conds[41] || conds[42] || conds[43] || conds[44] ||
807 conds[45] || conds[46] || conds[47] || conds[48] || conds[49] ||
808 conds[50] || conds[51] || conds[52] || conds[53] || conds[54] ||
809 conds[55] || conds[56] || conds[57] || conds[58] || conds[59] ||
810 conds[60] || conds[61] || conds[62] || conds[63] || conds[64]
811 ;
812 */
813 }
814
815 /* Ternary. */
816 void
817 mcdc020a (int a)
818 {
819 /* In C this is reduced to
820 _1 = argc != 0;
821 e = (int) _1;
822 but in D the branches are preserved. */
823 x = a ? 1 : 0; /* conditions(2/2) */
824 x = a ? 2 : 1; /* conditions(2/2) */
825 }
826
827 void
828 mcdc020b (int a, int b)
829 {
830 x = (a || b) ? 1 : 0; /* conditions(3/4) true(1) */
831 /* conditions(end) */
832 }
833
834 void
835 mcdc020c (int a, int b)
836 {
837 x = a ? 0 /* conditions(2/2) */
838 : b ? 1 /* conditions(1/2) false(0) */
839 /* conditions(end) */
840 : 2;
841 }
842
843 int
844 mcdc020d (int b, int c, int d, int e, int f)
845 {
846 return ((b ? c : d) && e && f); /* conditions(7/10) true(2) false(3 4) */
847 /* conditions(end) */
848 }
849
850 /* Infinite loop (no exit-edge), this should not be called, but it should
851 compile fine. */
852 void
853 mcdc021a ()
854 {
855 while (1) {}
856 }
857
858 /* If edges are not properly contracted the a && id (b) will be interpreted as
859 two independent expressions. */
860 void
861 mcdc021d (int a, int b, int c, int d)
862 {
863 if (a && id (b)) /* conditions(1/4) true(0 1) false(0) */
864 /* conditions(end) */
865 x = 1;
866 else if (c && id (d)) /* conditions(1/4) true(0 1) false(0) */
867 /* conditions(end) */
868 x = 2;
869 else
870 x = 3;
871 }
872
873 /* Adapted from linux arch/x86/tools/relocs.c
874 With poor edge contracting this became an infinite loop. */
875 void
876 mcdc022a (int a, int b)
877 {
878 for (int i = 0; i < 5; i++) /* conditions(2/2) */
879 {
880 x = i;
881 for (int j = i; j < 5; j++) /* conditions(2/2) */
882 {
883 if (id (id (a)) || id (b)) /* conditions(3/4) true(0) */
884 /* conditions(end) */
885 continue;
886 b = inv(b);
887 }
888 }
889 }
890
891 int
892 mcdc022b (int a)
893 {
894 int devt;
895 if (a) /* conditions(2/2) */
896 {
897 x = a * 2;
898 if (x != a / 10 || x != a % 10) /* conditions(1/4) true(1) false(0 1) */
899 /* conditions(end) */
900 return 0;
901 } else {
902 devt = id (a);
903 if (devt) /* conditions(1/2) true(0) */
904 /* conditions(end) */
905 return 0;
906 }
907
908 return devt;
909 }
910
911 /* Adapted from linux arch/x86/events/intel/ds.c
912
913 It broken sorting so that the entry block was not the first node after
914 sorting. */
915 void
916 mcdc022c (int a)
917 {
918 if (!a) /* conditions(2/2) */
919 return;
920
921 for (int i = 0; i < 5; i++) /* conditions(2/2) */
922 {
923 if (id (a + i) || inv (a - 1)) /* conditions(1/4) false(0 1) true(1) */
924 /* conditions(end) */
925 x = a + i;
926 if (inv (a)) /* conditions(1/2) true(0) */
927 /* conditions(end) */
928 break;
929 }
930 }
931
932 void
933 mcdc022d (int a)
934 {
935 int i;
936 for (i = 0; i < id (a); i++) /* conditions(1/2) true(0) */
937 {
938 if (!inv (a)) /* conditions(1/2) false(0)*/
939 /* conditions(end) */
940 break;
941 }
942
943 if (i < a) /* conditions(1/2) false(0) */
944 /* conditions(end) */
945 x = a + 1;
946 }
947
948 /* Adapted from openssl-3.0.1/crypto/cmp/cmp_msg.c ossl_cmp_error_new (). */
949 void
950 mcdc022e (int a, int b, int c, int d)
951 {
952 if (a || b) /* conditions(1/4) true(0) false(0 1) */
953 /* conditions(end) */
954 {
955 if (always (c)) /* conditions(1/2) false(0) */
956 /* conditions(end) */
957 goto err;
958 d++;
959 }
960
961 if (d) /* conditions(0/2) true(0) false(0) */
962 /* conditions(end) */
963 goto err;
964 return;
965
966 err:
967 noop ();
968 }
969
970 /* 023 specifically tests that masking works correctly, which gets complicated
971 fast with a mix of operators and deep subexpressions. These tests violates
972 the style guide slightly to emphasize the nesting. They all share the same
973 implementation and only one input is given to each function to obtain clean
974 coverage results. */
975 void
976 mcdc023a (int a, int b, int c, int d, int e, int f, int g, int h, int i, int k,
977 int l, int m, int n)
978 {
979 // [a m n] = 0, [b, ...] = 1
980 // a is masked by b and the remaining terms should be short circuited
981 if (/* conditions(1/24) true(0 2 3 4 5 6 7 8 9 10 11) false(0 1 2 3 4 5 6 7 8 9 10 11) */
982 /* conditions(end) */
983 (a || b)
984 || ( ((c && d) || (e && (f || g) && h))
985 && (k || l)
986 && (m || n)))
987 x = a + b;
988 else
989 x = b + c;
990 }
991
992 void
993 mcdc023b (int a, int b, int c, int d, int e, int f, int g, int h, int i, int k,
994 int l, int m, int n)
995 {
996 // [a b d h] = 0, [c, ...] = 1
997 // h = 0 => false but does not mask (a || b) or (c && d). d = 0 masks c.
998 if (/* conditions(4/24) true(0 1 2 3 4 5 6 7 8 9 10 11) false(2 4 5 6 8 9 10 11) */
999 /* conditions(end) */
1000 (a || b)
1001 || ( ((c && d) || (e && (f || g) && h))
1002 && (k || l)
1003 && (m || n)))
1004 x = a + b;
1005 else
1006 x = b + c;
1007 }
1008
1009 void
1010 mcdc023c (int a, int b, int c, int d, int e, int f, int g, int h, int i, int k,
1011 int l, int m, int n)
1012 {
1013 /* [m n a b] = 0, [...] = 1
1014 n,m = 0 should mask all other terms than a, b */
1015 if (/* conditions(4/24) true(0 1 2 3 4 5 6 7 8 9 10 11) false(2 3 4 5 6 7 8 9) */
1016 /* conditions(end) */
1017 (a || b)
1018 || ( ((c && d) || (e && (f || g) && h))
1019 && (k || l)
1020 && (m || n)))
1021 x = a + b;
1022 else
1023 x = b + c;
1024 }
1025
1026 void
1027 mcdc023d (int a, int b, int c, int d, int e, int f, int g, int h, int i, int k,
1028 int l, int m, int n)
1029 {
1030 /* [a b] = 0, [h, ...] = 1
1031 n,m = 0 should mask all other terms than a, b */
1032 if (/* conditions(4/24) true(0 1 2 3 4 5 6 7 8 9 10 11) false(2 3 4 5 6 7 10 11) */
1033 /* conditions(end) */
1034 (a || b)
1035 || ( ((c && d) || (e && (f || g) && h))
1036 && (k || l)
1037 && (m || n)))
1038 x = a + b;
1039 else
1040 x = b + c;
1041 }
1042
1043 void
1044 mcdc023e (int a, int b, int c, int d, int e, int f, int g, int h, int i, int k,
1045 int l, int m, int n)
1046 {
1047 /* [a b d] = 0, [c h, ...] = 1
1048 h = 1 should mask c, d, leave other terms intact.
1049 If [k l m n] were false then h itself would be masked.
1050 [a b] are masked as collateral by [m n]. */
1051 if (/* conditions(5/24) true(0 1 2 3 6 9 11) false(0 1 2 3 4 5 6 7 8 9 10 11) */
1052 /* conditions(end) */
1053 (a || b)
1054 || ( ((c && d) || (e && (f || g) && h))
1055 && (k || l)
1056 && (m || n)))
1057 x = a + b;
1058 else
1059 x = b + c;
1060 }
1061
1062 void
1063 mcdc023f (int a, int b, int c, int d, int e, int f, int g, int h, int i, int k,
1064 int l, int m, int n)
1065 {
1066 /* [a b c f g] = 0, [e, ...] = 1
1067 [f g] = 0 should mask e, leave [c d] intact. */
1068 if (/* conditions(5/24) true(0 1 2 3 4 5 6 7 8 9 10 11) false(3 4 7 8 9 10 11) */
1069 /* conditions(end) */
1070 (a || b)
1071 || ( ((c && d) || (e && (f || g) && h))
1072 && (k || l)
1073 && (m || n)))
1074 x = a + b;
1075 else
1076 x = b + c;
1077 }
1078
1079 void
1080 mcdc023g (int a, int b, int c, int d, int e, int f, int g, int h, int i, int k,
1081 int l, int m, int n)
1082 {
1083 /* [a b d f g] = 0, [e c, ...] = 1
1084 Same as 023f but with [c d] flipped so d masks c rather than c
1085 short-circuits. This should not be lost. */
1086 if (/* conditions(5/24) true(0 1 2 3 4 5 6 7 8 9 10 11) false(2 4 7 8 9 10 11) */
1087 /* conditions(end) */
1088 (a || b)
1089 || ( ((c && d) || (e && (f || g) && h))
1090 && (k || l)
1091 && (m || n)))
1092 x = a + b;
1093 else
1094 x = b + c;
1095 }
1096
1097 /* Gotos, return, labels can make odd graphs. It is important that conditions
1098 are assigned to the right expression, and that there are no miscounts. In
1099 these tests values may be re-used, as checking things like masking an
1100 independence is done in other test cases and not so useful here. */
1101 void
1102 mcdc024a (int a, int b)
1103 {
1104 /* This is a reference implementation without the labels, which should not
1105 alter behavior. */
1106 if (a && b) /* conditions(2/4) true(0 1) */
1107 /* conditions(end) */
1108 {
1109 x = 1;
1110 }
1111 else
1112 {
1113 x = 2;
1114 }
1115
1116 if (a || b) /* conditions(2/4) false(0 1) */
1117 /* conditions(end) */
1118 {
1119 x = 1;
1120 }
1121 else
1122 {
1123 x = 2;
1124 }
1125 }
1126
1127 void
1128 mcdc024b (int a, int b)
1129 {
1130 if (a && b) /* conditions(2/4) true(0 1) */
1131 /* conditions(end) */
1132 {
1133 label1:
1134 x = 1;
1135 }
1136 else
1137 {
1138 x = 2;
1139 }
1140
1141 if (a || b) /* conditions(2/4) false(0 1) */
1142 /* conditions(end) */
1143 {
1144 label2:
1145 x = 1;
1146 }
1147 else
1148 {
1149 x = 2;
1150 }
1151 }
1152
1153 void
1154 mcdc024c (int a, int b)
1155 {
1156
1157 if (a && b) /* conditions(2/4) true(0 1) */
1158 /* conditions(end) */
1159 {
1160 x = 1;
1161 }
1162 else
1163 {
1164 label1:
1165 x = 2;
1166 }
1167
1168 if (a || b) /* conditions(2/4) false(0 1) */
1169 /* conditions(end) */
1170 {
1171 x = 1;
1172 }
1173 else
1174 {
1175 label2:
1176 x = 2;
1177 }
1178 }
1179
1180 void
1181 mcdc024d (int a, int b)
1182 {
1183 if (a && b) /* conditions(2/4) true(0 1) */
1184 /* conditions(end) */
1185 {
1186 label1:
1187 x = 1;
1188 }
1189 else
1190 {
1191 label2:
1192 x = 2;
1193 }
1194
1195 if (a || b) /* conditions(2/4) false(0 1) */
1196 /* conditions(end) */
1197 {
1198 label3:
1199 x = 1;
1200 }
1201 else
1202 {
1203 label4:
1204 x = 2;
1205 }
1206 }
1207
1208 int
1209 mcdc024e (int a, int b, int c)
1210 {
1211 /* Graphs can get complicated with the innermost returns and else-less if,
1212 so we must make sure these conditions are counted correctly. */
1213 if (a) /* conditions(1/2) true(0) */
1214 /* conditions(end) */
1215 {
1216 if (b) /* conditions(0/2) true(0) false(0) */
1217 /* conditions(end) */
1218 {
1219 if (c) /* conditions(0/2) true(0) false(0) */
1220 /* conditions(end) */
1221 return 1;
1222 else
1223 return 2;
1224 }
1225
1226 if (a) /* conditions(0/2) true(0) false(0) */
1227 /* conditions(end) */
1228 return 3;
1229 }
1230
1231 return 5;
1232 }
1233
1234 /* Nested else-less ifs with inner returns needs to be counted right, which
1235 puts some pressure on the expression isolation. */
1236 int
1237 mcdc024f (int a, int b, int c)
1238 {
1239 if (a) /* conditions(1/2) true(0) */
1240 /* conditions(end) */
1241 {
1242 if (b) /* conditions(0/2) true(0) false(0) */
1243 /* conditions(end) */
1244 {
1245 if (c) /* conditions(0/2) true(0) false(0) */
1246 /* conditions(end) */
1247 {
1248 if (a) /* conditions(0/2) true(0) false(0) */
1249 /* conditions(end) */
1250 return 1;
1251 else
1252 return 2;
1253 }
1254
1255 if (a) /* conditions(0/2) true(0) false(0) */
1256 /* conditions(end) */
1257 return 3;
1258 }
1259
1260 if (b) /* conditions(0/2) true(0) false(0) */
1261 /* conditions(end) */
1262 return 4;
1263 }
1264 return 5;
1265 }
1266
1267 int
1268 mcdc024g (int a, int b, int c)
1269 {
1270 if (b) /* conditions(1/2) true(0) */
1271 /* conditions(end) */
1272 return 0;
1273
1274 if (a) /* conditions(1/2) true(0) */
1275 /* conditions(end) */
1276 {
1277 if (b) /* conditions(0/2) true(0) false(0) */
1278 /* conditions(end) */
1279 {
1280 b += 2;
1281 if (b & 0xFF) /* conditions(0/2) true(0) false(0) */
1282 /* conditions(end) */
1283 c++;
1284
1285 return c;
1286 }
1287 c += 10;
1288 }
1289 return 1;
1290 }
1291
1292
1293 int
1294 mcdc024h (int a, int b, int c)
1295 {
1296 if (b) /* conditions(1/2) true(0) */
1297 /* conditions(end) */
1298 goto inner;
1299
1300 if (a) /* conditions(1/2) true(0) */
1301 /* conditions(end) */
1302 ++a;
1303
1304
1305 if (a) /* conditions(1/2) true(0) */
1306 /* conditions(end) */
1307 {
1308 if (b) /* conditions(0/2) true(0) false(0) */
1309 /* conditions(end) */
1310 {
1311 inner:
1312 b += 2;
1313 if (b & 0xFF) /* conditions(0/2) true(0) false(0) */
1314 /* conditions(end) */
1315 c++;
1316
1317 return c;
1318 }
1319 c += 10;
1320 }
1321 return 1;
1322 }
1323
1324 int
1325 mcdc024i (int a, int b, int c)
1326 {
1327 fst:
1328 b++;
1329 snd:
1330 b++;
1331
1332 if (b > 10) /* conditions(2/2) */
1333 /* conditions(end) */
1334 goto end;
1335
1336 if (b < 5) /* conditions(2/2) */
1337 /* conditions(end) */
1338 goto fst;
1339 else
1340 goto snd;
1341
1342 end:
1343 if (a) /* conditions(1/2) true(0) */
1344 /* conditions(end) */
1345 ++a;
1346
1347
1348 if (a) /* conditions(1/2) true(0) */
1349 /* conditions(end) */
1350 {
1351 if (b) /* conditions(0/2) true(0) false(0) */
1352 /* conditions(end) */
1353 {
1354 b += 2;
1355 if (b & 0xFF) /* conditions(0/2) true(0) false(0) */
1356 /* conditions(end) */
1357 c++;
1358
1359 return c;
1360 }
1361 c += 10;
1362 }
1363 return 1;
1364 }
1365
1366 /* Adapted from alsa-lib 1.2.8 src/control/control.c. If two expressions share
1367 an outcome with bypass nodes they would be marked twice. */
1368 int
1369 mcdc025a (int a, int b, int c)
1370 {
1371 int err;
1372 if (id (a)) /* conditions(1/2) true(0) */
1373 /* conditions(end) */
1374 {
1375 if (b) /* conditions(0/2) true(0) false(0) */
1376 /* conditions(end) */
1377 return -1;
1378 }
1379 else
1380 {
1381 err = id (c);
1382 if (err > 0) /* conditions(1/2) false(0) */
1383 /* conditions(end) */
1384 return err;
1385 }
1386 err = id (a);
1387 return err;
1388 }
1389
1390 /* Boolean expressions in function call parameters. These tests are all built
1391 with a reference expression which should behave the same as the function
1392 call versions. */
1393 int
1394 mcdc026a (int a, int b, int c, int d, int e)
1395 {
1396 int cad = c && d; /* conditions(4/4) */
1397 /* conditions(end) */
1398 int x = a && b && cad && e; /* conditions(5/8) false(0 1 3) */
1399 /* conditions(end) */
1400 int y = a && b && id (c && d) && e; /* conditions(5/8; 4/4) false(0 1 3;;) */
1401 /* conditions(end) */
1402 return x + y;
1403 }
1404
1405 int
1406 mcdc026b (int a, int b, int c, int d, int e)
1407 {
1408 int dae = d && e; /* conditions(3/4) false(1) */
1409 /* conditions(end) */
1410 int x = a && b && c && dae; /* conditions(6/8) false(0 1) */
1411 int y = a && b && c && id (d && e); /* conditions(6/8; 3/4) false(0 1; 1) */
1412 /* conditions(end) */
1413 return x + y;
1414 }
1415
1416 int
1417 mcdc026c (int a, int b, int c, int d, int e)
1418 {
1419 int cod = c || d; /* conditions(3/4) true(1) */
1420 /* conditions(end) */
1421 int x = a && b && cod && e; /* conditions(5/8) false(0 1 3) */
1422 int y = a && b && id (c || d) && e; /* conditions(5/8; 3/4) true(;1) false(0 1 3;) */
1423 /* conditions(end) */
1424 return x+y;
1425 }
1426
1427 int
1428 mcdc026d (int a, int b, int c, int d, int e)
1429 {
1430 int aab = a && b; /* conditions(2/4) false(0 1) */
1431 /* conditions(end) */
1432 int cod = c || d; /* conditions(3/4) true(1) */
1433 /* conditions(end) */
1434 int x = aab && cod && e; /* conditions(4/6) false(0 2) */
1435 /* conditions(end) */
1436 int y = id (a && b) && id (c || d) && e; /* conditions(2/4;4/6;3/4) true(;;1) false(0 1;0 2;;) */
1437 /* conditions(end) */
1438 return x + y;
1439 }
1440
1441 int
1442 mcdc026e (int a, int b, int c, int d, int e)
1443 {
1444 int cod = c || d; /* conditions(3/4) true(1) */
1445 /* conditions(end) */
1446 int dae = d && e; /* conditions(3/4) false(1) */
1447 /* conditions(end) */
1448 int aacod = a && cod; /* conditions(3/4) false(0)*/
1449 /* conditions(end) */
1450 int x = aacod && dae; /* conditions(4/4) */
1451 /* conditions(end) */
1452 int y = id (a && id (c || d)) && id (d && e); /* conditions(3/4; 3/4; 4/4; 3/4) true(;1;;) false(0;;;1) */
1453 /* conditions(end) */
1454 return x + y;
1455 }
1456
1457 void main ()
1458 {
1459 mcdc001a (0, 1);
1460
1461 mcdc001b (0, 1);
1462 mcdc001b (0, 0);
1463
1464 mcdc001c (0, 1);
1465 mcdc001c (0, 0);
1466 mcdc001c (1, 1);
1467
1468 mcdc001d (1, 1, 1);
1469 mcdc001d (0, 1, 0);
1470
1471 mcdc002a (1, 0);
1472
1473 mcdc002b (1, 0);
1474 mcdc002b (1, 1);
1475
1476 mcdc002c (0, 0);
1477 mcdc002c (1, 1);
1478 mcdc002c (1, 0);
1479
1480 mcdc002d (1, 1, 1);
1481 mcdc002d (1, 0, 0);
1482
1483 mcdc003a (0, 0);
1484 mcdc003a (1, 0);
1485
1486 mcdc004a (0);
1487 mcdc004b (0);
1488 mcdc004b (1);
1489 mcdc004c (1);
1490
1491 mcdc004d (0, 0, 0);
1492 mcdc004d (1, 1, 1);
1493
1494 mcdc004e (0, 0, 0);
1495 mcdc004e (1, 1, 1);
1496
1497 mcdc004f (1, 1, 1);
1498
1499 mcdc005a (1, 0, 1);
1500
1501 mcdc005b (1, 1, 0, 0);
1502 mcdc005b (1, 0, 0, 0);
1503
1504 mcdc005c (0, 1, 1, 0);
1505
1506 mcdc005d (1, 0, 0, 0);
1507
1508 mcdc005e (0, 0);
1509 mcdc005e (0, 1);
1510 mcdc005e (1, 0);
1511 mcdc005e (1, 1);
1512
1513 mcdc006a (0, 0, 0, 0, 0);
1514 mcdc006a (1, 0, 0, 0, 0);
1515 mcdc006a (1, 1, 1, 0, 0);
1516
1517 mcdc006b (0, 0, 0);
1518 mcdc006b (1, 0, 0);
1519 mcdc006b (1, 1, 0);
1520 mcdc006b (1, 1, 1);
1521
1522 mcdc006c (0, 0, 0);
1523 mcdc006c (1, 0, 0);
1524 mcdc006c (1, 1, 0);
1525 mcdc006c (1, 1, 1);
1526
1527 mcdc006d (1, 0, 0);
1528 mcdc006d (1, 0, 1);
1529
1530 mcdc006e (0, 0, 0, 0);
1531 mcdc006e (0, 0, 1, 0);
1532 mcdc006e (0, 1, 0, 0);
1533
1534 mcdc007a (0, 0, 0, 0);
1535 mcdc007a (1, 0, 0, 0);
1536 mcdc007a (0, 0, 1, 0);
1537
1538 mcdc007b (0, 0, 0);
1539 mcdc007b (0, 1, 1);
1540 mcdc007b (1, 0, 1);
1541
1542 mcdc007c (0, 0, 0);
1543 mcdc007c (0, 1, 1);
1544 mcdc007c (1, 0, 1);
1545
1546 mcdc007d (0, 1, 0, 1, 1);
1547
1548 mcdc008a (0);
1549
1550 mcdc008b (0);
1551
1552 mcdc008c (0);
1553 mcdc008c (1);
1554
1555 mcdc008d (0, 0, 0, 0);
1556 mcdc008d (1, 0, 0, 0);
1557 mcdc008d (1, 0, 1, 0);
1558 mcdc008d (1, 0, 1, 1);
1559 mcdc008d (1, 1, 1, 1);
1560
1561 mcdc009a (0, 0);
1562 mcdc009a (1, 1);
1563
1564 mcdc009b (0, 0);
1565 mcdc009b (1, 0);
1566
1567 mcdc010a (0, 0);
1568 mcdc010a (0, 9);
1569 mcdc010a (2, 1);
1570
1571 mcdc010b ();
1572
1573 mcdc010c (0, 0, 0);
1574 mcdc010c (0, 1, 0);
1575
1576 mcdc010d (1);
1577
1578 mcdc011a (0, 0, 0);
1579 mcdc011a (1, 1, 0);
1580 mcdc011a (1, 0, 1);
1581
1582 mcdc012a (0, 0, 0);
1583 mcdc012a (0, 1, 1);
1584
1585 mcdc013a (0, 0, 0);
1586 mcdc013a (0, 0, 1);
1587 mcdc013a (0, 1, 0);
1588 mcdc013a (0, 1, 1);
1589 mcdc013a (1, 0, 0);
1590 mcdc013a (1, 0, 1);
1591 mcdc013a (1, 1, 0);
1592 mcdc013a (1, 1, 1);
1593
1594 mcdc014a ();
1595
1596 mcdc015a (0, 0);
1597 mcdc015a (1, 0);
1598
1599 mcdc015b (0, 0);
1600 mcdc015b (0, 1);
1601 mcdc015b (6, 1);
1602
1603 mcdc015c (0, 0);
1604 mcdc015c (0, 5);
1605 mcdc015c (6, 1);
1606
1607 mcdc015d (1, 0, 0);
1608
1609 mcdc016a (5, 5);
1610
1611 mcdc016b (5, 5);
1612 mcdc016b (6, 5);
1613
1614 mcdc016c (5, 5);
1615
1616 mcdc016d (1, 0);
1617
1618 mcdc017a (0);
1619 mcdc017a (2);
1620
1621 mcdc017b (2, 0);
1622 mcdc017b (0, 1);
1623
1624 mcdc017c (1, 1);
1625
1626 mcdc018a (0, 0, 1, 1, 0, 0, 0, 0);
1627 mcdc018a (0, 1, 0, 0, 0, 0, 1, -2);
1628 mcdc018a (0, 6, 0, 0, 0, 0, 1, -2);
1629 mcdc018a (0, 6, 0, 0, 0, 0, 1, -2);
1630 mcdc018a (0, 0, 0, 1, 0, 1, 1, 0);
1631 mcdc018a (1, 0, 0, 0, 1, 1, 0, 0);
1632
1633 mcdc018b (1, 0, 0);
1634 mcdc018b (1, 1, 0);
1635
1636 mcdc018c (1, 1);
1637
1638 mcdc019a ();
1639
1640 mcdc020a (0);
1641 mcdc020a (1);
1642
1643 mcdc020b (0, 0);
1644 mcdc020b (1, 0);
1645
1646 mcdc020c (0, 1);
1647 mcdc020c (1, 1);
1648
1649 mcdc020d (0, 0, 0, 0, 0);
1650 mcdc020d (1, 0, 0, 1, 1);
1651 mcdc020d (1, 1, 0, 1, 1);
1652
1653 mcdc021d (1, 0, 1, 0);
1654
1655 mcdc022a (0, 0);
1656
1657 mcdc022b (0);
1658 mcdc022b (1);
1659
1660 mcdc022c (0);
1661 mcdc022c (1);
1662
1663 mcdc022d (1);
1664 mcdc022e (0, 1, 1, 0);
1665
1666 mcdc023a (0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
1667 mcdc023b (0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1);
1668 mcdc023c (0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0);
1669 mcdc023d (0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1);
1670 mcdc023e (0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1);
1671 mcdc023f (0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1);
1672 mcdc023g (0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1);
1673
1674 mcdc024a (0, 1);
1675 mcdc024b (0, 1);
1676 mcdc024c (0, 1);
1677 mcdc024d (0, 1);
1678 mcdc024a (1, 0);
1679 mcdc024b (1, 0);
1680 mcdc024c (1, 0);
1681 mcdc024d (1, 0);
1682
1683 mcdc024e (0, 0, 0);
1684 mcdc024f (0, 0, 0);
1685 mcdc024g (0, 0, 0);
1686 mcdc024h (0, 0, 0);
1687 mcdc024i (0, 0, 0);
1688
1689 mcdc025a (0, 0, 1);
1690
1691 mcdc026a (1, 1, 1, 0, 1);
1692 mcdc026a (1, 1, 0, 0, 1);
1693 mcdc026a (1, 1, 1, 1, 1);
1694
1695 mcdc026b (1, 1, 1, 0, 1);
1696 mcdc026b (1, 1, 0, 0, 1);
1697 mcdc026b (1, 1, 1, 1, 1);
1698
1699 mcdc026c (1, 1, 1, 0, 1);
1700 mcdc026c (1, 1, 0, 0, 1);
1701 mcdc026c (1, 1, 1, 1, 1);
1702
1703 mcdc026d (1, 1, 1, 0, 1);
1704 mcdc026d (1, 1, 0, 0, 1);
1705 mcdc026d (1, 1, 1, 1, 1);
1706
1707 mcdc026e (1, 1, 1, 0, 1);
1708 mcdc026e (1, 1, 0, 0, 1);
1709 mcdc026e (1, 1, 1, 1, 1);
1710 }
1711
1712 /* { dg-final { run-gcov conditions { --conditions gcov1.d } } } */