     thrust::transform(d_first, d_first + n, d_result.begin(), thrust::identity<T>());
 
     ASSERT_EQUAL(h_result, d_result);
+}
 #endif
-}
 DECLARE_VARIABLE_UNITTEST(TestTransformUnaryCountingIterator);
 
-template <typename T>
-  void TestTransformBinaryCountingIterator(size_t n)
+#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100) == 40400
+template <typename T>
+void TestTransformBinaryCountingIterator(size_t)
 {
     // GCC 4.4.x has a known failure with auto-vectorization (due to -O3 or -ftree-vectorize) of this test
     // See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43251
-#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100) == 40400
+
     KNOWN_FAILURE;
+}
 #else
-    // be careful not to generate a range larger than we can represent
+template <typename T>
+void TestTransformBinaryCountingIterator(size_t n)
+{
+    // Be careful not to generate a range larger than we can represent.
     n = thrust::min<size_t>(n, static_cast<size_t>(std::numeric_limits<T>::max()));
 
     thrust::counting_iterator<T, thrust::host_system_tag>   h_first = thrust::make_counting_iterator<T>(0);

    thrust::transform(d_first, d_first + n, d_first, d_result.begin(), thrust::plus<T>());

    ASSERT_EQUAL(h_result, d_result);
#endif
}
DECLARE_VARIABLE_UNITTEST(TestTransformBinaryCountingIterator);



DECLARE_VARIABLE_UNITTEST(TestTransformIfBinaryToDiscardIterator);


#if ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100) == 40400) || defined(__INTEL_COMPILER) 
template <typename T>
void TestTransformUnaryCountingIterator(size_t)
{
    // G++ 4.4.x has a known failure with auto-vectorization (due to -O3 or
    // -ftree-vectorize) of this test.
    // See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43251

    // ICPC has a known failure with auto-vectorization (due to -O2 or
    // higher) of this test.
    // See nvbug 200326708.
    KNOWN_FAILURE;
}
#else
template <typename T>
void TestTransformUnaryCountingIterator(size_t n)
{
    // Be careful not to generate a range larger than we can represent.
    n = thrust::min<size_t>(n, static_cast<size_t>(std::numeric_limits<T>::max()));

    thrust::counting_iterator<T, thrust::host_system_tag>   h_first = thrust::make_counting_iterator<T>(0);
