[PATCH] libgccjit: Add support for `restrict` attribute on function parameters
David Malcolm
dmalcolm@redhat.com
Tue Aug 29 15:34:44 GMT 2023
On Tue, 2023-08-29 at 17:15 +0200, Guillaume Gomez wrote:
> We finished the investigation and found out the issue: when passing
> arguments by value to functions, rustc still provides "NoAlias" as
> attribute to the argument whereas it should never be passed in this
> case. Luckily for us, in case the argument is a function pointer
> coming from a struct field, it crashes GCC, which is what allowed us
> to figure out about this. A code which reproduces this bug:
[...snip...]
> So in short: the patch in the previous mail which added this check:
>
> ```
> RETURN_NULL_IF_FAIL (type->is_pointer (), NULL, NULL, "not a pointer
> type");
> ```
>
> is correct and ready.
Thanks. I've gone ahead and pushed it to gcc trunk for you as r14-
3552-g29763b002459cb.
[...snip...]
Dave
More information about the Jit
mailing list