[cfe-dev] clang hangs when compiling simple program
John Myers
atomicdog.jwm at gmail.com
Thu Oct 7 15:27:55 PDT 2010
On Thu, Oct 7, 2010 at 2:45 PM, JP <
jpbonn-keyword-cfedev.957c48 at corniceresearch.com> wrote:
> Clang has recently started hanging when compiling the following program
> from the GCC testsuite. It had been working fine until a recent change
> (in the past couple days). I've update from the trunk and done a clean
> rebuild but still have the problem. Does anyone else have the same issue?
>
> $ clang -cc1 -nostdinc -triple=arm- -emit-llvm-bc /tmp/z.c -o /tmp/z.bc
>
> int
> main (void)
> {
> long j = 0x40000000;
> if ((unsigned int) (0x40000000 + j) < 0L)
> abort ();
>
> return 0;
> }
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
john at ubuntu:~/src$ /usr/local/src/llvm/Release/bin/clang -cc1 -nostdinc
-triple=arm- -emit-llvm-bc z.c -o z.bc
z.c:6:41: warning: comparison of unsigned expression < 0 is always false
if ((unsigned int) (0x40000000 + j) < 0L)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~
z.c:7:9: warning: implicitly declaring C library function 'abort' with type
'void (void)'
abort ();
^
z.c:7:9: note: please include the header <stdlib.h> or explicitly provide a
declaration for 'abort'
2 warnings generated.
john at ubuntu:~/src$ /usr/local/src/llvm/Release/bin/clang --version
clang version 2.9 (trunk 115637)
Target: x86_64-unknown-linux-gnu
Thread model: posix
john at ubuntu:~/src$ cat z.c
int
main (void)
{
long j = 0x40000000;
if ((unsigned int) (0x40000000 + j) < 0L)
abort ();
return 0;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20101007/7570e343/attachment.html>
More information about the cfe-dev
mailing list