http://llvm.org/bugs/show_bug.cgi?id=3835
Summary: miscompilation of constant function returning a struct
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: LLVM Codegen
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
clang translate the C function "AVExtFloat av_dbl2ext(double d)
__attribute__((const));" to "void @av_dbl2ext(%struct.AVExtFloat* noalias sret,
double) readnone".
But the handling of the const argument is wrong : the struct is pass as
argument for output. So the function is no more const.
Compiling the attached test case at -O3 remove the call to av_dbl2ext because
of that.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs