add regression test for alignment of constants

closes #1741
This commit is contained in:
Andrew Kelley 2019-09-27 10:58:39 -04:00
parent a1a3e46e0a
commit 805f9b309b
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
2 changed files with 7 additions and 0 deletions

View File

@ -24,6 +24,7 @@ comptime {
_ = @import("behavior/bugs/1500.zig");
_ = @import("behavior/bugs/1607.zig");
_ = @import("behavior/bugs/1735.zig");
_ = @import("behavior/bugs/1741.zig");
_ = @import("behavior/bugs/1851.zig");
_ = @import("behavior/bugs/1914.zig");
_ = @import("behavior/bugs/2006.zig");

View File

@ -0,0 +1,6 @@
const std = @import("std");
test "fixed" {
const x: f32 align(128) = 12.34;
std.testing.expect(@ptrToInt(&x) % 128 == 0);
}