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
Hey I'm back with another match-statement related bug. I don't think this is the same as my last issue since the pass name (internalisation) and cause appear to be different.
Like before, I trimmed the code down as much as possible. Lines 17-18 contain the offending code. If those lines are replaced with line 20, the error disappears. Something to do with having a let __ in __ in the body of a case ___ -> ___.
This problem happened when compiling for both C and multicore targets.
Internal compiler error. Please report this:
https://github.com/diku-dk/futhark/issues
After internalisation:
In function makeConvLayer_6036
When checking function body
In expression of statement
{makeConvLayer_res_6528 : ({}, i64),
makeConvLayer_res_6529 : ({}, i64),
makeConvLayer_res_6530 : ({}, i8),
makeConvLayer_res_6531 : ({}, [makeConvLayer_res_6528][makeConvLayer_res_6529]f64)}
in body of case {1i8}
Type error:
Type annotation is
{i64, i64, i8, [?0][?1]f64}
But result returns type
{i64, i64, i8, [NM_6521][NM_6521]f64, [defunc_2_tabulate_2d_arg_6536][defunc_2_tabulate_2d_arg_6535]f64}
Hope that's enough info!
The text was updated successfully, but these errors were encountered:
This bug was due to two factors we hadn't seen combined before:
Using complex initialisation expressions in sum types.
Using a sum type that contains arrays.
The first is just a matter of style preference, but the second is often not a good idea. However, it is fine in this case because the arrays along the different constructors have the same type, and it should definitely work. And now it does. (Hopefully. I still suspect there are bugs lurking in defunctionalisation where we don't propagate sizes properly. Fortunately they almost always result in compiler crashes rather than silent miscompilation.)
Thanks for the pointer about array types in sum types--this is definitely something I wouldn't have thought to be an issue but is quite valuable to know about!
Hey I'm back with another match-statement related bug. I don't think this is the same as my last issue since the pass name (internalisation) and cause appear to be different.
Like before, I trimmed the code down as much as possible. Lines 17-18 contain the offending code. If those lines are replaced with line 20, the error disappears. Something to do with having a
let __ in __
in the body of acase ___ -> ___
.This problem happened when compiling for both C and multicore targets.
bug.zip
Finally, here is a printout of compiler's output:
Hope that's enough info!
The text was updated successfully, but these errors were encountered: