Commit 29b284f
committed
Fix initialization of multiple sub-members within a union
The attached test shows that we could reach recursive initialisation of
unions with a byte_update instead of a union expression, which was added
in a8592a7. That previous fix did not consider the case of multiple
sub-members being initialised.
The test was constructed using creduce, starting from code included in
the Linux kernel.1 parent 4889328 commit 29b284f
File tree
3 files changed
+54
-10
lines changed- regression/ansi-c/Union_Initialization3
- src/ansi-c
3 files changed
+54
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
521 | 520 | | |
522 | 521 | | |
523 | 522 | | |
524 | 523 | | |
525 | 524 | | |
526 | | - | |
| 525 | + | |
527 | 526 | | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
533 | 533 | | |
534 | 534 | | |
535 | 535 | | |
| |||
556 | 556 | | |
557 | 557 | | |
558 | 558 | | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
559 | 568 | | |
560 | 569 | | |
561 | 570 | | |
| |||
0 commit comments