You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
emit-c: == / != on two &str views compares addresses; LLVM compares contents #1560
Found while checking D61 (#1480) backend parity; present on main ae609cd (the baseline compiler emits the same C).
fn eq(a: &str, b: &str) -> bool: a == b
fn main:
let x = "ab"
let y = "a" ++ "b"
print(f"{eq(x, y)} {x == y}")
LLVM: true true. emit-c: false true. The view comparison in C compares the pointers (the #1137 class, fixed for < on the LLVM side). A test helper fn check(got: &str, want: &str) therefore diverges between backends; D61 parity runs used owned str parameters to get around it.
Activity
emit-c: == / != and the orderings on &str views compare the text (#1560)
C backend and modeled-C fixes: map loops, generic structs, view compa…