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

Pete Cooper via llvm-dev llvm-dev at lists.llvm.org
Thu Jul 21 14:41:00 PDT 2016

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());


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160721/0647d8af/attachment.html>

More information about the llvm-dev mailing list