You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's slightly surprising to me that this is the only test that fails for that reason. There are plenty of other tests that also use C varargs, and they apparently don't cause issues (and don't hit these functions). The test does use incomplete features (fn_delegation), but I don't immediately see why that is relevant. I think these functions should just work.
Anyway, implementing them appears straightforward (the llvm backend does something similar).
thread 'rustc' panicked at /home/folkertdev/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/gccjit-2.5.0/src/context.rs:1131:17:
unimplemented primitive type for builtin (type: BT_VALIST_REF)
which I believe is because BT_VALIST_REF (and likely also BT_VALIST_ARG) are unimplemented:
caseBT_CONST_STRING: returnm_ctxt->get_type (GCC_JIT_TYPE_CONST_CHAR_PTR);
// case BT_DFLOAT32:// case BT_DFLOAT64:// case BT_DFLOAT128:// case BT_VALIST_REF:// case BT_VALIST_ARG:caseBT_I1: returnm_ctxt->get_int_type (1, true);
caseBT_I2: returnm_ctxt->get_int_type (2, true);
That's where my knowledge stops. An LLM suggested that a void pointer might work, but I have no idea whether that is accurate (or how to even evaluate whether that is in fact correct).
The text was updated successfully, but these errors were encountered:
va_start/va_end are necessary for defining variadic functions in Rust. For declaring variadic functions defined in C, they are not used. The tests/ui/abi/variadic-ffi.rs test should also fail with cg_gcc though. You probably didn't see the failure because of
I'm happy to see such an issue at this repository! Because I have a similar problem in my hobby programming language (Cyrus) and I tried to get builtin va_arg and va_list and it seems that they're not implemented yet. I sent an email for David Malcolm, The maintainer of gccjit to ask help. He told me dear @antoyo is experienced in this topic.
Mostly this is just an infodump, because I'm not sure how to fix this one.
The
tests/ui/delegation/fn-header.rs
test fails because these two functions are not implemented.It's slightly surprising to me that this is the only test that fails for that reason. There are plenty of other tests that also use C varargs, and they apparently don't cause issues (and don't hit these functions). The test does use incomplete features (
fn_delegation
), but I don't immediately see why that is relevant. I think these functions should just work.Anyway, implementing them appears straightforward (the llvm backend does something similar).
However, this still fails because
which I believe is because
BT_VALIST_REF
(and likely alsoBT_VALIST_ARG
) are unimplemented:https://github.com/rust-lang/gcc/blob/48664a6cab29d48138ffa004b7978d52ef73e3ac/gcc/jit/jit-builtins.cc#L542-L543
That's where my knowledge stops. An LLM suggested that a void pointer might work, but I have no idea whether that is accurate (or how to even evaluate whether that is in fact correct).
The text was updated successfully, but these errors were encountered: