text: #include "acc_testsuite.h"
  #ifndef T1
  //T1:atomic,construct-independent,V:2.0-2.7
  int test1(){
      int err = 0;
      srand(SEED);
      int  *a = (int *)malloc(n * sizeof(int));
      int *totals = (int *)malloc((n/10 + 1) * sizeof(int));
      int *totals_comparison = (int *)malloc((n/10 + 1) * sizeof(int));
  
      for (int x = 0; x < n; ++x){
          for (int y = 0; y < 8; ++y){
              if (rand()/(real_t)(RAND_MAX) > .5){
                  a[x] += 1<<y;
              }
          }
      }
      for (int x = 0; x < n/10 + 1; ++x){
          totals[x] = 0;
          totals_comparison[x] = 0;
      }
  
      #pragma acc data copyin(a[0:n]) copy(totals[0:n/10 + 1])
      {
          #pragma acc parallel
          {
              #pragma acc loop
              for (int x = 0; x < n; ++x){
                  #pragma acc atomic update
                      totals[x%(n/10 + 1)] ^= a[x];
              }
          }
      }
  
      for (int x = 0; x < n; ++x){
          totals_comparison[x%(n/10 + 1)] ^= a[x];
      }
      for (int x = 0; x < 10; ++x){
          if (fabs(totals_comparison[x] - totals[x]) > PRECISION){
              err += 1;
              break;
          }
      }
  
      return err;
  }
  #endif
  
  int main(){
      int failcode = 0;
      int failed;
  #ifndef T1
      failed = 0;
      for (int x = 0; x < NUM_TEST_CALLS; ++x){
          failed = failed + test1();
      }
      if (failed != 0){
          failcode = failcode + (1 << 0);
      }
  #endif
      return failcode;
  }
  