[LLVMbugs] [Bug 4411] New: Durring compilation from GCC front end to IR signed/ unsigned type information gets lost

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Jun 18 05:17:25 PDT 2009


           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: unassignedbugs at nondot.org
        ReportedBy: hisu00 at gmail.com
                CC: llvmbugs at cs.uiuc.edu

Created an attachment (id=3101)
 --> (http://llvm.org/bugs/attachment.cgi?id=3101)

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

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.

More information about the llvm-bugs mailing list