The r-prefixed waves absorb the runtime, reject, and byte-compare rows of the migrated native carriers; each fixture is one directory with one case.ww and a //ww:error, //ww:compile, //ww:run, or //ww:run-exit directive covering both frontends.
17 lines
441 B
Plaintext
17 lines
441 B
Plaintext
//ww:run
|
|
// Runtime half of 940_global_sret_run.c local_assign_regression.
|
|
package main;
|
|
type quad = struct { a: i64, b: i64, c: i64, d: i64 };
|
|
fn mk(x: i64) quad = {
|
|
return quad { a = x, b = x + 1i64, c = x + 2i64, d = x + 3i64 };
|
|
};
|
|
export fn main() i32 = {
|
|
let g: quad;
|
|
g = mk(20i64);
|
|
if (g.a != 20i64) { return 1; };
|
|
if (g.b != 21i64) { return 2; };
|
|
if (g.c != 22i64) { return 3; };
|
|
if (g.d != 23i64) { return 4; };
|
|
return 0;
|
|
};
|