-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorfrontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.
Milestone
Description
Zig Version
0.10.0-dev.3286+9ec3f611c
Steps to Reproduce
const std = @import("std");
test {
const array = try std.testing.allocator.create([10][10 * 10 * 10 * 10]u64);
defer std.testing.allocator.destroy(array);
array[1][1] = 0;
var a: u32 = 1;
var b: u32 = 1;
var i: u32 = 0;
while (i < 12345678) : (i += 1) {
array[a][b] += array[a][b] * i;
}
try std.testing.expect(array[a][b] == 0);
}Expected Behavior
test passes in <1s
(and does with stage 1)
Actual Behavior
test passes in > 20s (stage 2)
in debug and releasesafe modes.
seems to work fine in releasefast. (there's no memcpy in the llvmir)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorfrontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.