OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc4/] [libgomp/] [testsuite/] [libgomp.c/] [copyin-2.c] - Diff between revs 273 and 519

Only display areas with differences | Details | Blame | View Log

Rev 273 Rev 519
/* { dg-do run } */
/* { dg-do run } */
/* { dg-options "-O2" } */
/* { dg-options "-O2" } */
/* { dg-require-effective-target tls_runtime } */
/* { dg-require-effective-target tls_runtime } */
 
 
#include <omp.h>
#include <omp.h>
#include <stdlib.h>
#include <stdlib.h>
 
 
struct { int t; char buf[64]; } thr = { 32, "" };
struct { int t; char buf[64]; } thr = { 32, "" };
#pragma omp threadprivate (thr)
#pragma omp threadprivate (thr)
 
 
int
int
main (void)
main (void)
{
{
  int l = 0;
  int l = 0;
 
 
  omp_set_dynamic (0);
  omp_set_dynamic (0);
  omp_set_num_threads (6);
  omp_set_num_threads (6);
 
 
#pragma omp parallel copyin (thr) reduction (||:l)
#pragma omp parallel copyin (thr) reduction (||:l)
  {
  {
    l = thr.t != 32;
    l = thr.t != 32;
    thr.t = omp_get_thread_num () + 11;
    thr.t = omp_get_thread_num () + 11;
  }
  }
 
 
  if (l || thr.t != 11)
  if (l || thr.t != 11)
    abort ();
    abort ();
 
 
#pragma omp parallel reduction (||:l)
#pragma omp parallel reduction (||:l)
  l = thr.t != omp_get_thread_num () + 11;
  l = thr.t != omp_get_thread_num () + 11;
 
 
  if (l)
  if (l)
    abort ();
    abort ();
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.