parameter attributes assigned to wrong argument #1885
Labels
bugzilla
Issues migrated from bugzilla
llvm-tools
All llvm tools that do not have corresponding tag
miscompilation
Extended Description
consider the function
struct long s{
long a;
long b;
}
void f(struct s, char *, char);
In x86_64 the struct s is passed in registers, so the llvm type should be
f(i64, i64, i8 *, i8 sext)
The problem is that in TypeConvert::ConvertFunctionType, the Idx is only
incremented by one when passing by the first (C) argument. Because of this the
llvm type generated is invalid:
f(i64, i64, i8 * sext, i8)
The text was updated successfully, but these errors were encountered: