clang hangs when compiling simple program

classic Classic list List threaded Threaded
5 messages Options
JP
Reply | Threaded
Open this post in threaded view
|

clang hangs when compiling simple program

JP
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
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: clang hangs when compiling simple program

John Myers


On Thu, Oct 7, 2010 at 2:45 PM, JP <[hidden email]> 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
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev


john@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@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@ubuntu:~/src$ cat z.c

int
main (void)
{
    long j = 0x40000000;
    if ((unsigned int) (0x40000000 + j) < 0L)
        abort ();

    return 0;
}


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
JP
Reply | Threaded
Open this post in threaded view
|

Re: clang hangs when compiling simple program

JP
On 10/7/10 3:27 PM, John Myers wrote:

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

Thanks

I guess I should have mentioned I'm using Debug + Asserts configuration
on OSX.

$ clang --version
clang version 2.9 (trunk 115977)
Target: x86_64-apple-darwin10
Thread model: posix

The last version I know worked for me was about 115329.  I'll have to
try a full reconfigure and rebuild.
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: clang hangs when compiling simple program

John McCall

On Oct 7, 2010, at 4:14 PM, JP wrote:

> On 10/7/10 3:27 PM, John Myers wrote:
>> john@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@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
>
> Thanks
>
> I guess I should have mentioned I'm using Debug + Asserts configuration
> on OSX.
>
> $ clang --version
> clang version 2.9 (trunk 115977)
> Target: x86_64-apple-darwin10
> Thread model: posix
>
> The last version I know worked for me was about 115329.  I'll have to
> try a full reconfigure and rebuild.

It is very likely that this was introduced by me in r115725 and
fixed by Argyrios in r115985, so please let us know if it's still failing with ToT.

John.
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
JP
Reply | Threaded
Open this post in threaded view
|

Re: clang hangs when compiling simple program

JP
  On 10/7/10 4:55 PM, John McCall wrote:
> It is very likely that this was introduced by me in r115725 and
> fixed by Argyrios in r115985, so please let us know if it's still failing with ToT.
>
> John.

Thanks,  it appears fixed in 116003.
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev