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] - Diff between revs 301 and 338

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

Rev 301 Rev 338
// PR c++/31598
// PR c++/31598
// { dg-do compile }
// { dg-do compile }
//
//
// Copyright (C) 2007 Free Software Foundation, Inc.
// Copyright (C) 2007 Free Software Foundation, Inc.
// Contributed by Theodore.Papadopoulo
// Contributed by Theodore.Papadopoulo
//   16 Apr 2007 
//   16 Apr 2007 
int i;
int i;
template  struct A { A() {} };
template  struct A { A() {} };
template  struct C { C() { i++; } C(const C &) { i += 2; } };
template  struct C { C() { i++; } C(const C &) { i += 2; } };
struct D { D() {} };
struct D { D() {} };
struct M { typedef double E; };
struct M { typedef double E; };
template 
template 
struct R
struct R
{
{
  R()
  R()
  {
  {
    typedef A B;
    typedef A B;
    B b;
    B b;
    #pragma omp parallel for firstprivate(b) schedule(guided)
    #pragma omp parallel for firstprivate(b) schedule(guided)
      for (int t = 0; t < 10; ++t)
      for (int t = 0; t < 10; ++t)
        ;
        ;
  }
  }
};
};
template 
template 
struct S
struct S
{
{
  S()
  S()
  {
  {
    typedef C B;
    typedef C B;
    B b;
    B b;
    #pragma omp parallel for firstprivate(b)
    #pragma omp parallel for firstprivate(b)
      for (int t = 0; t < 10; ++t)
      for (int t = 0; t < 10; ++t)
        ;
        ;
  }
  }
};
};
struct U
struct U
{
{
  U()
  U()
  {
  {
    D b;
    D b;
    #pragma omp parallel for firstprivate(b)
    #pragma omp parallel for firstprivate(b)
      for (int t = 0; t < 10; ++t)
      for (int t = 0; t < 10; ++t)
        ;
        ;
  }
  }
};
};
int
int
main ()
main ()
{
{
  R r;
  R r;
  S s;
  S s;
  U u;
  U u;
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

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