@@ -21,6 +21,17 @@ void TestPartitionSimple(void)
21
21
typedef typename Vector::value_type T;
22
22
typedef typename Vector::iterator Iterator;
23
23
24
+ // GCC 11.1.0 miscompiles and segfaults for certain versions of this test.
25
+ // It's not reproducible on other compilers, and the test passes when
26
+ // optimizations are disabled. It only affects 32-bit value types, and
27
+ // impacts all CPU host/device combinations tested.
28
+ #if defined(THRUST_GCC_VERSION) && THRUST_GCC_VERSION == 110100
29
+ if (sizeof (T) == 4 )
30
+ {
31
+ return ;
32
+ }
33
+ #endif
34
+
24
35
Vector data (5 );
25
36
data[0 ] = 1 ;
26
37
data[1 ] = 2 ;
@@ -321,6 +332,17 @@ struct TestPartitionStencil
321
332
{
322
333
void operator ()(const size_t n)
323
334
{
335
+ // GCC 11.1.0 miscompiles and segfaults for certain versions of this test.
336
+ // It's not reproducible on other compilers, and the test passes when
337
+ // optimizations are disabled. It only affects 32-bit value types, and
338
+ // impacts all CPU host/device combinations tested.
339
+ #if defined(THRUST_GCC_VERSION) && THRUST_GCC_VERSION == 110100
340
+ if (n == 0 && sizeof (T) == 4 )
341
+ {
342
+ return ;
343
+ }
344
+ #endif
345
+
324
346
// setup ranges
325
347
thrust::host_vector<T> h_data = unittest::random_integers<T>(n);
326
348
thrust::host_vector<T> h_stencil = unittest::random_integers<T>(n);
@@ -689,6 +711,17 @@ struct TestStablePartition
689
711
{
690
712
void operator ()(const size_t n)
691
713
{
714
+ // GCC 11.1.0 miscompiles and segfaults for certain versions of this test.
715
+ // It's not reproducible on other compilers, and the test passes when
716
+ // optimizations are disabled. It only affects 32-bit value types, and
717
+ // impacts all CPU host/device combinations tested.
718
+ #if defined(THRUST_GCC_VERSION) && THRUST_GCC_VERSION == 110100
719
+ if (n == 0 && sizeof (T) == 4 )
720
+ {
721
+ return ;
722
+ }
723
+ #endif
724
+
692
725
// setup ranges
693
726
thrust::host_vector<T> h_data = unittest::random_integers<T>(n);
694
727
thrust::device_vector<T> d_data = h_data;
@@ -708,6 +741,17 @@ struct TestStablePartitionStencil
708
741
{
709
742
void operator ()(const size_t n)
710
743
{
744
+ // GCC 11.1.0 miscompiles and segfaults for certain versions of this test.
745
+ // It's not reproducible on other compilers, and the test passes when
746
+ // optimizations are disabled. It only affects 32-bit value types, and
747
+ // impacts all CPU host/device combinations tested.
748
+ #if defined(THRUST_GCC_VERSION) && THRUST_GCC_VERSION == 110100
749
+ if (n == 0 && sizeof (T) == 4 )
750
+ {
751
+ return ;
752
+ }
753
+ #endif
754
+
711
755
// setup ranges
712
756
thrust::host_vector<T> h_data = unittest::random_integers<T>(n);
713
757
thrust::host_vector<T> h_stencil = unittest::random_integers<T>(n);
0 commit comments