http://llvm.org/bugs/show_bug.cgi?id=4411
Summary: Durring compilation from GCC front end to IR
signed/unsigned type information gets lost
Product: libraries
Version: 2.5
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Common Code Generator Code
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Created an attachment (id=3101)
--> (http://llvm.org/bugs/attachment.cgi?id=3101)
Example
Take a look at the attached C source code (typetest.c).
The function open takes a typed function pointer as parameter (nfy parameter
with type nfy_fct). nfy_fct function type takes an unsigned int and a short
parameter.
link_nfy_fct function (which is from type nfy_fct) is compiled to:
define internal void @link_nfy_fct(i32 %event, i16 signext %cond) nounwind
The header of open function is transformed to:
define i32 @open(i32 %linktype, i8* %linkname, i8* %linkoptions, i32 %timeout,
void (i32, i16)* %nfy) nounwind
where the type for nfy should be void (i32, i16 signext)* instead of void (i32,
i16)*. With this the information gets lost in C to IR phase and the C Backend
produces code which can not be compiled with some other strict compilers.
--
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