unittests/ADT/ArrayRefTest.cpp: Suppress r243995 on g++-4.8 for now to unbreak bots.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 5 Aug 2015 06:11:23 +0000 (06:11 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 5 Aug 2015 06:11:23 +0000 (06:11 +0000)
For example of mingw-w64-g++-4.8.1,

  llvm/unittests/ADT/ArrayRefTest.cpp: In member function 'virtual void {anonymous}::ArrayRefTest_AllocatorCopy_Test::TestBody()':
  llvm/unittests/ADT/ArrayRefTest.cpp:56:40: internal compiler error: in count_type_elements, at expr.c:5523
     } Array3Src[] = {{"hello"}, {"world"}};
                                          ^
  Please submit a full bug report,
  with preprocessed source if appropriate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244017 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/ADT/ArrayRefTest.cpp

index 0640241..00afcae 100644 (file)
@@ -46,6 +46,9 @@ TEST(ArrayRefTest, AllocatorCopy) {
   EXPECT_TRUE(Array2.equals(Array2c));
   EXPECT_NE(Array2.data(), Array2c.data());
 
+#if __GNUC__==4 && __GNUC_MINOR__==8
+  // g++-4.8 cannot compile the block below.
+#else
   // Check that copy can cope with uninitialized memory.
   struct NonAssignable {
     const char *Ptr;
@@ -57,6 +60,7 @@ TEST(ArrayRefTest, AllocatorCopy) {
   ArrayRef<NonAssignable> Array3Copy = makeArrayRef(Array3Src).copy(Alloc);
   EXPECT_EQ(makeArrayRef(Array3Src), Array3Copy);
   EXPECT_NE(makeArrayRef(Array3Src).data(), Array3Copy.data());
+#endif
 }
 
 TEST(ArrayRefTest, DropBack) {