http://llvm.org/bugs/show_bug.cgi?id=2204

           Summary: clang: sizeof(int16_t) != 2
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [email protected]


Compile the below testcase with clang, it aborts on Linux x86-64:

#include <stdlib.h>
#include <stdint.h>
int main()
{
        if(sizeof(int16_t) != 2)
                abort();
}


$ /home/edwin/llvm-svn/llvm/tools/clang/utils/ccc foo.c
foo.c
clang -emit-llvm-bc -o foo.o foo.c
llvm-ld -native -disable-internalize -o a.out foo.o
$ ./a.out
Aborted

Look at the declarations of int16_t from the headers, I think that attribute is
not handled.

/home/edwin/llvm-svn/llvm/tools/clang/utils/ccc foo.c -E|grep int16_t
typedef signed short int __int16_t;
typedef unsigned short int __uint16_t;
typedef int int16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned short int uint16_t;
 if(sizeof(int16_t) != 2)


-- 
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

Reply via email to