Closed
Description
trait Tr { type T; } impl Tr for u8 { type T=(); }
struct S<I: Tr>(I::T);
fn foo<I: Tr>(i: I::T) {
S::<I>(i);
}
fn main() {
foo::<u8>(());
}
LLVM error:
Call parameter type does not match function signature!
%"S<u8>" undef
%"S<u8>"* call void @"_ZN11S$LT$u8$GT$8drop.78617h8596c9a8a6407b21E"(%"S<u8>" undef)
LLVM ERROR: Broken function found, compilation aborted!
playpen: application terminated with error code 1
The problem seems to be that some part of LLVM does not like the C_undef
we generate for zero-sized types. cc @dotdash
Metadata
Metadata
Assignees
Labels
No labels