Bug 987290 - Work around a GCC 4.6.3 ICE - no review, bustage fix, a=sledru
authorBenoit Jacob <bjacob@mozilla.com>
Mon, 28 Apr 2014 12:27:13 -0400
changeset 199041 ae2af33e459f9605df168d3528a94fa6ddff523a
parent 199040 85fdf3690aa77cc506e393dc32bf5e0c6d4ccf63
child 199042 959fa4cfb483f515730ab444f010ae31598b5222
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssledru
bugs987290
milestone31.0a2
Bug 987290 - Work around a GCC 4.6.3 ICE - no review, bustage fix, a=sledru
mfbt/tests/TestTypedEnum.cpp
--- a/mfbt/tests/TestTypedEnum.cpp
+++ b/mfbt/tests/TestTypedEnum.cpp
@@ -270,29 +270,29 @@ void TestBinOp(const T1& t1, const T2& t
 
   RequireLiteralType<ResultType>();
   TestNonConvertibilityForOneType<ResultType>();
 
   UnsignedIntegerType unsignedIntegerResult
     = Op<o>(UnsignedIntegerType(t1), UnsignedIntegerType(t2));
 
   MOZ_RELEASE_ASSERT(unsignedIntegerResult == UnsignedIntegerType(result));
-  MOZ_RELEASE_ASSERT(unsignedIntegerResult == UnsignedIntegerType(TypedEnum(result)));
+  MOZ_RELEASE_ASSERT(TypedEnum(unsignedIntegerResult) == TypedEnum(result));
   MOZ_RELEASE_ASSERT((!unsignedIntegerResult) == (!result));
   MOZ_RELEASE_ASSERT((!!unsignedIntegerResult) == (!!result));
   MOZ_RELEASE_ASSERT(bool(unsignedIntegerResult) == bool(result));
 
   // Part 2:
   // Test the compound-assignment operator, i.e.
   //   result Op= t3;
   TypedEnum newResult = result;
   OpAssign<o>(newResult, t3);
   UnsignedIntegerType unsignedIntegerNewResult = unsignedIntegerResult;
   OpAssign<o>(unsignedIntegerNewResult, UnsignedIntegerType(t3));
-  MOZ_RELEASE_ASSERT(unsignedIntegerNewResult == UnsignedIntegerType(newResult));
+  MOZ_RELEASE_ASSERT(TypedEnum(unsignedIntegerNewResult) == newResult);
 
   // Part 3:
   // Test additional boolean operators that we unfortunately had to add to
   // CastableTypedEnumResult at some point to please some compiler,
   // even though bool convertibility should have been enough.
   MOZ_RELEASE_ASSERT(result == TypedEnum(result));
   MOZ_RELEASE_ASSERT(!(result != TypedEnum(result)));
   MOZ_RELEASE_ASSERT((result && true) == bool(result));
@@ -317,17 +317,17 @@ void TestTilde(const T& t)
   typedef decltype(result) ResultType;
 
   RequireLiteralType<ResultType>();
   TestNonConvertibilityForOneType<ResultType>();
 
   UnsignedIntegerType unsignedIntegerResult = ~(UnsignedIntegerType(t));
 
   MOZ_RELEASE_ASSERT(unsignedIntegerResult == UnsignedIntegerType(result));
-  MOZ_RELEASE_ASSERT(unsignedIntegerResult == UnsignedIntegerType(TypedEnum(result)));
+  MOZ_RELEASE_ASSERT(TypedEnum(unsignedIntegerResult) == TypedEnum(result));
   MOZ_RELEASE_ASSERT((!unsignedIntegerResult) == (!result));
   MOZ_RELEASE_ASSERT((!!unsignedIntegerResult) == (!!result));
   MOZ_RELEASE_ASSERT(bool(unsignedIntegerResult) == bool(result));
 }
 
 // Helper dispatching a given triple of operands to all operator-specific
 // testing functions.
 template<typename TypedEnum, typename T1, typename T2, typename T3>