[cfe-commits] r171801 - in /cfe/trunk: lib/CodeGen/CGExprScalar.cpp test/CodeGen/compound-assign-overflow.c

Dmitri Gribenko gribozavr at gmail.com
Wed Jan 9 11:20:54 PST 2013


On Wed, Jan 9, 2013 at 4:08 PM, İsmail Dönmez <ismail at donmez.ws> wrote:
> Hi;
>
>
> On Mon, Jan 7, 2013 at 11:25 PM, Will Dietz <wdietz2 at illinois.edu> wrote:
>>
>> Author: wdietz2
>> Date: Mon Jan  7 16:25:52 2013
>> New Revision: 171801
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=171801&view=rev
>> Log:
>> [ubsan] Use correct type for compound assignment ops.
>>
>> Added:
>>     cfe/trunk/test/CodeGen/compound-assign-overflow.c
>
>
> This test seems to fail on openSUSE 12.2 32bit because...
>
>>
>> Added: cfe/trunk/test/CodeGen/compound-assign-overflow.c
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/compound-assign-overflow.c?rev=171801&view=auto
>>
>> ==============================================================================
>> --- cfe/trunk/test/CodeGen/compound-assign-overflow.c (added)
>> +++ cfe/trunk/test/CodeGen/compound-assign-overflow.c Mon Jan  7 16:25:52
>> 2013
>> @@ -0,0 +1,36 @@
>> +// Verify proper type emitted for compound assignments
>> +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s
>> -fsanitize=signed-integer-overflow,unsigned-integer-overflow | FileCheck %s
>
>                                              ^^^^^^^^^^^^^^^^^^^^^^
> We have an 64bit target here.
>
>
>>
>> +
>> +#include <stdint.h>
>
>
> This includes
>
> features.h which in turn includes gnu/stubs.h which says:
>
> #if defined __x86_64__ && defined __LP64__
> # include <gnu/stubs-64.h>
> #endif
>
> Since the target is 64bit it tries to include gnu/stubs-64.h but it doesn't
> exist on 32bit host. Maybe XFAIL on 32bit?

Please update to latest trunk and retest.  I've applied a fix in
r171853 that should work.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/




More information about the cfe-commits mailing list