[llvm] r244017 - unittests/ADT/ArrayRefTest.cpp: Suppress r243995 on g++-4.8 for now to unbreak bots.

NAKAMURA Takumi geek4civic at gmail.com
Tue Aug 4 23:11:23 PDT 2015


Author: chapuni
Date: Wed Aug  5 01:11:23 2015
New Revision: 244017

URL: http://llvm.org/viewvc/llvm-project?rev=244017&view=rev
Log:
unittests/ADT/ArrayRefTest.cpp: Suppress r243995 on g++-4.8 for now to unbreak bots.

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.

Modified:
    llvm/trunk/unittests/ADT/ArrayRefTest.cpp

Modified: llvm/trunk/unittests/ADT/ArrayRefTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/ArrayRefTest.cpp?rev=244017&r1=244016&r2=244017&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/ArrayRefTest.cpp (original)
+++ llvm/trunk/unittests/ADT/ArrayRefTest.cpp Wed Aug  5 01:11:23 2015
@@ -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) {




More information about the llvm-commits mailing list