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.0rc1/] [gcc/] [testsuite/] [g++.dg/] [gomp/] [pr31598.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// PR c++/31598
2
// { dg-do compile }
3
//
4
// Copyright (C) 2007 Free Software Foundation, Inc.
5
// Contributed by Theodore.Papadopoulo
6
//   16 Apr 2007 
7
 
8
int i;
9
template  struct A { A() {} };
10
template  struct C { C() { i++; } C(const C &) { i += 2; } };
11
struct D { D() {} };
12
 
13
struct M { typedef double E; };
14
 
15
template 
16
struct R
17
{
18
  R()
19
  {
20
    typedef A B;
21
    B b;
22
    #pragma omp parallel for firstprivate(b) schedule(guided)
23
      for (int t = 0; t < 10; ++t)
24
        ;
25
  }
26
};
27
 
28
template 
29
struct S
30
{
31
  S()
32
  {
33
    typedef C B;
34
    B b;
35
    #pragma omp parallel for firstprivate(b)
36
      for (int t = 0; t < 10; ++t)
37
        ;
38
  }
39
};
40
 
41
struct U
42
{
43
  U()
44
  {
45
    D b;
46
    #pragma omp parallel for firstprivate(b)
47
      for (int t = 0; t < 10; ++t)
48
        ;
49
  }
50
};
51
 
52
int
53
main ()
54
{
55
  R r;
56
  S s;
57
  U u;
58
  return 0;
59
}

powered by: WebSVN 2.1.0

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