bloat-buster/tests/pointer_sub.bbb
David Gonzalez Martin 0a506b2e01
All checks were successful
CI / ci (Release, ubuntu-latest) (pull_request) Successful in 1m2s
CI / ci (MinSizeRel, ubuntu-latest) (pull_request) Successful in 1m8s
CI / ci (RelWithDebInfo, ubuntu-latest) (pull_request) Successful in 1m7s
CI / ci (Debug, ubuntu-latest) (pull_request) Successful in 6m0s
CI / ci (Release, ubuntu-latest) (push) Successful in 1m3s
CI / ci (MinSizeRel, ubuntu-latest) (push) Successful in 1m8s
CI / ci (RelWithDebInfo, ubuntu-latest) (push) Successful in 1m7s
CI / ci (Debug, ubuntu-latest) (push) Successful in 6m0s
Pass some basic tests
2025-06-12 13:25:24 -06:00

10 lines
177 B
Plaintext

[export] main = fn [cc(c)] () s32
{
>a: [_]s32 = [ 3, 1 ];
>p0 = &a[0];
>p1 = p0 + 1;
>sub: u32 = #truncate(p1 - p0);
if (sub != 1) #trap();
return 0;
}