[cfe-dev] nightly test suite failure: ms_struct-bitfield-init-1.c
Jay Foad
jay.foad at gmail.com
Wed Jun 15 06:08:34 PDT 2011
On 15 June 2011 09:37, Jay Foad <jay.foad at gmail.com> wrote:
> On 6 May 2011 09:29, Jay Foad <jay.foad at gmail.com> wrote:
>> I've just tried to run the test-suite, for the first time in ages. It
>> stops rather abruptly with:
>>
>> $ make TEST=nightly report report.html
>>
>> /home/jay/llvm/local/bin/llvm-gcc
>> -I/home/jay/llvm/gitobjdir/projects/test-suite/SingleSource/UnitTests
>> -I/home/jay/svn/llvm-project/test-suite/trunk/SingleSource/UnitTests
>> -I/home/jay/git/llvm/projects/test-suite/include -I../../include
>> -I/home/jay/llvm/gitobjdir/include -I/home/jay/git/llvm/include
>> -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -DNDEBUG -O3 -mllvm
>> -disable-llvm-optzns -m64 -fomit-frame-pointer -S
>> /home/jay/svn/llvm-project/test-suite/trunk/SingleSource/UnitTests/ms_struct-bitfield-init-1.c
>> -o Output/ms_struct-bitfield-init-1.ll -emit-llvm
>> /home/jay/svn/llvm-project/test-suite/trunk/SingleSource/UnitTests/ms_struct-bitfield-init-1.c:28:
>> error: size of array ‘a3’ is negative
>
> If I compile this test by hand, I get the same error:
>
> $ llvm-gcc -c ms_struct-bitfield-init-1.c -o /dev/null
> ms_struct-bitfield-init-1.c:28: error: size of array ‘a3’ is negative
>
> If I compile it with the system GCC, I *still* get the same error:
>
> $ gcc --version
> gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
> Copyright (C) 2010 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
> $ gcc -c ms_struct-bitfield-init-1.c -o /dev/null
> ms_struct-bitfield-init-1.c:28:12: error: size of array ‘a3’ is negative
>
> So how is this test supposed to pass on Linux/x86_64 ?
The problem is that GCC only seems to implement #pragma ms_struct on
Darwin. On Linux I get:
$ gcc -c -Wunknown-pragmas ms_struct-bitfield-init-1.c -o /dev/null
ms_struct-bitfield-init-1.c:20:0: warning: ignoring #pragma ms_struct on
ms_struct-bitfield-init-1.c:27:0: warning: ignoring #pragma ms_struct off
ms_struct-bitfield-init-1.c:28:12: error: size of array ‘a3’ is negative
So how about the attached patch? OK to commit?
Thanks,
Jay.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pragma-ms-struct
Type: application/octet-stream
Size: 870 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110615/ac671055/attachment.obj>
More information about the cfe-dev
mailing list