code generation bug for AKD specialisation of AUD code and printf
This is a strange bug that can be reproduced when compiling the following code:
use Array: all;
int[2] scanP( int[2] a)
{
return a;
}
int[*] scanP( int[*] a)
{
a = {[i] -> scanP( a[i])};
StdIO::printf (" ");
return a;
}
int main()
{
a = reshape( [2,2], iota(4));
a = scanP (a);
return 0;
}
and compiling with -noprelude
.
The reshape iota
is needed to enable akd-specialisation only.
This leads to a segfault due to an allocation with undefined size....