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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [libgomp/] [testsuite/] [libgomp.c++/] [pr35185.C] - Blame information for rev 856

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 273 jeremybenn
// PR middle-end/35185
2
// { dg-do run }
3
 
4
extern "C" void abort ();
5
 
6
struct S
7
{
8
  S () : s (6) {}
9
  ~S () {}
10
  int s;
11
};
12
 
13
__attribute__((noinline))
14
bool
15
bar (S s)
16
{
17
  return s.s != 6;
18
}
19
 
20
int
21
main ()
22
{
23
  S s;
24
  int err = 0;
25
#pragma omp parallel shared (s)
26
  {
27
    if (bar (s))
28
      #pragma omp atomic
29
        err++;
30
  }
31
  if (err)
32
    abort ();
33
}

powered by: WebSVN 2.1.0

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