All checks were successful
CI / ci (MinSizeRel, ubuntu-latest) (pull_request) Successful in 1m10s
CI / ci (Release, ubuntu-latest) (pull_request) Successful in 1m9s
CI / ci (RelWithDebInfo, ubuntu-latest) (pull_request) Successful in 1m13s
CI / ci (Debug, ubuntu-latest) (pull_request) Successful in 2m44s
CI / ci (MinSizeRel, ubuntu-latest) (push) Successful in 1m5s
CI / ci (RelWithDebInfo, ubuntu-latest) (push) Successful in 1m5s
CI / ci (Release, ubuntu-latest) (push) Successful in 1m4s
CI / ci (Debug, ubuntu-latest) (push) Successful in 2m37s
33 lines
381 B
Plaintext
33 lines
381 B
Plaintext
require = fn (ok: u1) void
|
|
{
|
|
if (!ok) #trap();
|
|
}
|
|
|
|
S = struct
|
|
{
|
|
a: u16,
|
|
b: u8,
|
|
c: u8,
|
|
d: u32,
|
|
}
|
|
|
|
[export] main = fn [cc(c)] () s32
|
|
{
|
|
>s: S = zero;
|
|
|
|
>p_s = &s;
|
|
p_s.& = {
|
|
.a = 1,
|
|
.b = 2,
|
|
.c = 3,
|
|
.d = 4,
|
|
};
|
|
|
|
require(s.a == 1);
|
|
require(s.b == 2);
|
|
require(s.c == 3);
|
|
require(s.d == 4);
|
|
|
|
return 0;
|
|
}
|