"-foreign" with >1 by-ref out params doesn't compile
This is probably easier to show than describe. If you try compile the following:
-foreign('static void bad_c(int arg1, int *result, int *result2) {*result = arg1; *result2 = arg1 + 1;}').
-foreign([bad_c(integer, -integer, -integer, -void)]).
-module(bad).
using "fleng -c bad.ghc" you get the following error:
bad~foreign.c:9:16: error: too few arguments to function call, expected 3, have 2
bad_c(a0, &a1);
~~~~~ ^
This is on release version 20.
If I only write result and omit result2, everything works.