| ... | ... | @@ -741,22 +741,26 @@ pub fn addCases(cases: *tests.TranslateCContext) void { |
| 741 | 741 | \\}; |
| 742 | 742 | }); |
| 743 | 743 | |
| 744 | | cases.add("align() attribute", |
| 745 | | \\__attribute__ ((aligned(128))) |
| 746 | | \\extern char my_array[16]; |
| 747 | | \\__attribute__ ((aligned(128))) |
| 748 | | \\void my_fn(void) { } |
| 749 | | \\void other_fn(void) { |
| 750 | | \\ char ARR[16] __attribute__ ((aligned (16))); |
| 751 | | \\} |
| 752 | | , &[_][]const u8{ |
| 753 | | \\pub extern var my_array: [16]u8 align(128); |
| 754 | | \\pub export fn my_fn() align(128) void {} |
| 755 | | \\pub export fn other_fn() void { |
| 756 | | \\ var ARR: [16]u8 align(16) = undefined; |
| 757 | | \\ _ = ARR; |
| 758 | | \\} |
| 759 | | }); |
| 744 | // Test case temporarily disabled: |
| 745 | // https://github.com/ziglang/zig/issues/12055 |
| 746 | if (false) { |
| 747 | cases.add("align() attribute", |
| 748 | \\__attribute__ ((aligned(128))) |
| 749 | \\extern char my_array[16]; |
| 750 | \\__attribute__ ((aligned(128))) |
| 751 | \\void my_fn(void) { } |
| 752 | \\void other_fn(void) { |
| 753 | \\ char ARR[16] __attribute__ ((aligned (16))); |
| 754 | \\} |
| 755 | , &[_][]const u8{ |
| 756 | \\pub extern var my_array: [16]u8 align(128); |
| 757 | \\pub export fn my_fn() align(128) void {} |
| 758 | \\pub export fn other_fn() void { |
| 759 | \\ var ARR: [16]u8 align(16) = undefined; |
| 760 | \\ _ = ARR; |
| 761 | \\} |
| 762 | }); |
| 763 | } |
| 760 | 764 | |
| 761 | 765 | cases.add("linksection() attribute", |
| 762 | 766 | \\// Use the "segment,section" format to make this test pass when |