authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-09-27 10:58:39-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-09-27 10:58:39-04:00
log805f9b309bee2d1a6c4fa34f1bc2746a8e60c35f
tree4266909f7526be08f61ccc2137c89b06f1547ca2
parenta1a3e46e0aa9add9997fe8d56f167830e007ab7f
signaturelock-open Commit is signed but in an unrecognized format.

add regression test for alignment of constants

closes #1741

2 files changed, 7 insertions(+), 0 deletions(-)

test/stage1/behavior.zig+1
......@@ -24,6 +24,7 @@ comptime {
2424 _ = @import("behavior/bugs/1500.zig");
2525 _ = @import("behavior/bugs/1607.zig");
2626 _ = @import("behavior/bugs/1735.zig");
27 _ = @import("behavior/bugs/1741.zig");
2728 _ = @import("behavior/bugs/1851.zig");
2829 _ = @import("behavior/bugs/1914.zig");
2930 _ = @import("behavior/bugs/2006.zig");
test/stage1/behavior/bugs/1741.zig created+6
......@@ -0,0 +1,6 @@
1const std = @import("std");
2
3test "fixed" {
4 const x: f32 align(128) = 12.34;
5 std.testing.expect(@ptrToInt(&x) % 128 == 0);
6}