bloat-buster/tests/noreturn_macro.bbb
David Gonzalez Martin 0eee2a4ff3
All checks were successful
CI / ci (ReleaseFast, ubuntu-latest) (pull_request) Successful in 2m53s
CI / ci (ReleaseSmall, ubuntu-latest) (pull_request) Successful in 2m52s
CI / ci (ReleaseSafe, ubuntu-latest) (pull_request) Successful in 2m58s
CI / ci (Debug, ubuntu-latest) (pull_request) Successful in 4m26s
CI / ci (ReleaseFast, ubuntu-latest) (push) Successful in 2m58s
CI / ci (ReleaseSmall, ubuntu-latest) (push) Successful in 2m56s
CI / ci (ReleaseSafe, ubuntu-latest) (push) Successful in 3m1s
CI / ci (Debug, ubuntu-latest) (push) Successful in 4m27s
Make more progress
2025-04-29 05:34:52 -06:00

28 lines
390 B
Plaintext

assert = macro (ok: u1) void
{
if (!ok)
{
unreachable;
}
}
align_forward = fn (value: u64, alignment: u64) u64
{
assert(alignment != 0);
>mask = alignment - 1;
>result = (value + mask) & ~mask;
return result;
}
[export] main = fn [cc(c)] () s32
{
>result = align_forward(1, 64);
if (result != 64)
{
#trap();
}
return 0;
}