     thrust::for_each(input.begin(), input.end(), CopyFunctorWithManyRegisters<N>());
 }
 DECLARE_UNITTEST(TestForEachLargeRegisterFootprint);
+
+
+void TestForEachNLargeRegisterFootprint()
+{
+    const size_t N = 100;
+
+    thrust::device_vector<int> data(N, 12345);
+
+    thrust::device_vector<int *> input(1, thrust::raw_pointer_cast(&data[0])); // length is irrelevant
+    
+    thrust::for_each_n(input.begin(), input.size(), CopyFunctorWithManyRegisters<N>());
+}
+DECLARE_UNITTEST(TestForEachNLargeRegisterFootprint);
 
 
 template <typename T, unsigned int N>

    ASSERT_EQUAL_QUIET(d_result, d_input.end());
}
DECLARE_VARIABLE_UNITTEST(TestForEach);


template <size_t N> __host__ __device__ void f   (int * x) { int temp = *x; f<N - 1>(x + 1); *x = temp;};


    ASSERT_EQUAL_QUIET(h_data, d_data);
}


void TestForEachWithLargeTypes(void)
{
    _TestForEachWithLargeTypes<int,    1>();
