tests: move compile errors not planned for stage2
This commit is contained in:
committed by
Jakub Konka
parent
cc3336c784
commit
90ae37cc00
@@ -13203,7 +13203,6 @@ fn zirCondbr(
|
||||
defer tracy.end();
|
||||
|
||||
const inst_data = sema.code.instructions.items(.data)[inst].pl_node;
|
||||
const src = inst_data.src();
|
||||
const cond_src: LazySrcLoc = .{ .node_offset_if_cond = inst_data.src_node };
|
||||
const extra = sema.code.extraData(Zir.Inst.CondBr, inst_data.payload_index);
|
||||
|
||||
@@ -13213,7 +13212,7 @@ fn zirCondbr(
|
||||
const uncasted_cond = try sema.resolveInst(extra.data.condition);
|
||||
const cond = try sema.coerce(parent_block, Type.bool, uncasted_cond, cond_src);
|
||||
|
||||
if (try sema.resolveDefinedValue(parent_block, src, cond)) |cond_val| {
|
||||
if (try sema.resolveDefinedValue(parent_block, cond_src, cond)) |cond_val| {
|
||||
const body = if (cond_val.toBool()) then_body else else_body;
|
||||
// We use `analyzeBodyInner` since we want to propagate any possible
|
||||
// `error.ComptimeBreak` to the caller.
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
export fn entry() void {
|
||||
if (2 == undefined) {}
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:11: error: use of undefined value here causes undefined behavior
|
||||
@@ -1,9 +0,0 @@
|
||||
export fn entry() void {
|
||||
if (2 == undefined) {}
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage1
|
||||
// target=native
|
||||
//
|
||||
// tmp.zig:2:11: error: use of undefined value here causes undefined behavior
|
||||
Reference in New Issue
Block a user