all tests passing on linux

This commit is contained in:
Andrew Kelley 2019-06-26 14:00:44 -04:00
parent 32c6f643ae
commit 33f996bb16
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
5 changed files with 11 additions and 7 deletions

View File

@ -5096,7 +5096,7 @@ fn gimmeTheBiggerInteger(a: u64, b: u64) u64 {
<p>
For example, if we were to introduce another function to the above snippet:
</p>
{#code_begin|test_err|values of type 'type' must be comptime known#}
{#code_begin|test_err|cannot store runtime value in type 'type'#}
fn max(comptime T: type, a: T, b: T) T {
return if (a > b) a else b;
}

View File

@ -335,8 +335,9 @@ struct ConstExprValue {
RuntimeHintSlice rh_slice;
} data;
ConstExprValue(const ConstExprValue &other) = delete; // plz zero initialize with {}
ConstExprValue& operator= (const ConstExprValue &other) = delete; // use copy_const_val
// uncomment these to find bugs. can't leave them uncommented because of a gcc-9 warning
//ConstExprValue(const ConstExprValue &other) = delete; // plz zero initialize with {}
//ConstExprValue& operator= (const ConstExprValue &other) = delete; // use copy_const_val
};
enum ReturnKnowledge {

View File

@ -691,7 +691,9 @@ static ZigLLVMDIScope *get_di_scope(CodeGen *g, Scope *scope) {
is_definition, scope_line, flags, is_optimized, nullptr);
scope->di_scope = ZigLLVMSubprogramToScope(subprogram);
ZigLLVMFnSetSubprogram(fn_llvm_value(g, fn_table_entry), subprogram);
if (!g->strip_debug_symbols) {
ZigLLVMFnSetSubprogram(fn_llvm_value(g, fn_table_entry), subprogram);
}
return scope->di_scope;
}
case ScopeIdDecls:

View File

@ -10726,6 +10726,8 @@ static ZigType *ir_resolve_peer_types(IrAnalyze *ira, AstNode *source_node, ZigT
} else if (prev_inst->value.type->id == ZigTypeIdOptional) {
return prev_inst->value.type;
} else {
if ((err = type_resolve(ira->codegen, prev_inst->value.type, ResolveStatusSizeKnown)))
return ira->codegen->builtin_types.entry_invalid;
return get_optional_type(ira->codegen, prev_inst->value.type);
}
} else {
@ -21547,7 +21549,7 @@ static IrInstruction *ir_analyze_instruction_from_bytes(IrAnalyze *ira, IrInstru
IrInstruction *result_loc = ir_resolve_result(ira, &instruction->base, instruction->result_loc,
dest_slice_type, nullptr, true, false);
if (type_is_invalid(result_loc->value.type) || instr_is_unreachable(result_loc)) {
if (result_loc != nullptr && (type_is_invalid(result_loc->value.type) || instr_is_unreachable(result_loc))) {
return result_loc;
}

View File

@ -123,8 +123,7 @@ pub const Lock = struct {
};
test "std.event.Lock" {
// https://github.com/ziglang/zig/issues/2377
//if (true) return error.SkipZigTest;
if (builtin.single_threaded) return error.SkipZigTest;
const allocator = std.heap.direct_allocator;