shithub: mc

ref: 0d3f5d4bd7b74a810db4424aafdaf398faa9c69a
dir: /test/abi/002_main.myr/

View raw version
use std

pkg =
        type foo = struct
                bar : uint32
        ;;
;;

const main = {
        var a : foo = [.bar = 158747960]
        call_me(a)

        /*
         * If argument alignment is not respected, the above will stuff
         * all eight bytes of %rdi into four bytes of stack, and the
         * overflow will clobber enough to cause a segfault. Explicitly
         * exiting via std.exit(0) will mask this failure, however.
         */
}


const call_me = { a : foo
        -> void
}