[llvm-dev] FreeBSD user willing to try fix a unit test?

Dimitry Andric via llvm-dev llvm-dev at lists.llvm.org
Sat Jul 23 11:08:38 PDT 2016


Hi Pete,

I tested this on recent FreeBSD 11.0, and indeed the test is now succeeding just fine, as the system compiler is now clang 3.8.0.

Let's just drop the || !defined(__FreeBSD__) part.  Btw, any idea what the defined(__llvm__) part is supposed to accomplish?

-Dimitry

> On 21 Jul 2016, at 23:41, Pete Cooper via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> Hi all
> 
> In unittests/ADT/APIntTest.cpp I came across this test:
> 
> // XFAIL this test on FreeBSD where the system gcc-4.2.1 seems to miscompile it.
> #if defined(__llvm__) || !defined(__FreeBSD__)
> 
> TEST(APIntTest, i33_Count) {
>   APInt i33minus2(33, static_cast<uint64_t>(-2), true);
>   EXPECT_EQ(0u, i33minus2.countLeadingZeros());
>   EXPECT_EQ(32u, i33minus2.countLeadingOnes());
>   EXPECT_EQ(33u, i33minus2.getActiveBits());
>   EXPECT_EQ(1u, i33minus2.countTrailingZeros());
>   EXPECT_EQ(32u, i33minus2.countPopulation());
>   EXPECT_EQ(-2, i33minus2.getSExtValue());
>   EXPECT_EQ(((uint64_t)-2)&((1ull<<33) -1), i33minus2.getZExtValue());
> }
> 
> #endif
> 
> Given that we are long past gcc 4.2, any chance someone with FreeBSD could check this now works and remove the XFAIL?
> 
> Thanks very much
> Pete
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160723/c645990a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160723/c645990a/attachment.sig>


More information about the llvm-dev mailing list