Jay Foad
2011-Jun-15 13:08 UTC
[LLVMdev] nightly test suite failure: ms_struct-bitfield-init-1.c
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/llvm-dev/attachments/20110615/ac671055/attachment.obj>
Jay Foad
2011-Jun-15 13:15 UTC
[LLVMdev] nightly test suite failure: ms_struct-bitfield-init-1.c
> So how about the attached patch? OK to commit?Or here's a different way of patching it, if you prefer. Thanks, Jay. -------------- next part -------------- A non-text attachment was scrubbed... Name: pragma-ms-struct-2 Type: application/octet-stream Size: 989 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110615/a1ebe3af/attachment.obj>
Douglas Gregor
2011-Jun-15 13:26 UTC
[LLVMdev] [cfe-dev] nightly test suite failure: ms_struct-bitfield-init-1.c
On Jun 15, 2011, at 6:15 AM, Jay Foad wrote:>> So how about the attached patch? OK to commit? > > Or here's a different way of patching it, if you prefer.This looks good. Please commit, thanks! - Doug
Reasonably Related Threads
- [LLVMdev] nightly test suite failure: ms_struct-bitfield-init-1.c
- [LLVMdev] nightly test suite failure: ms_struct-bitfield-init-1.c
- [LLVMdev] nightly test suite failure: ms_struct-bitfield-init-1.c
- [LLVMdev] nightly test suite failure: ms_struct-bitfield-init-1.c
- [LLVMdev] nightly test suite failure: ms_struct-bitfield-init-1.c