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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [gomp/] [pr33890.C] - Rev 693

Compare with Previous | Blame | View Log

// PR c++/33890
// { dg-do compile }
// { dg-options "-fopenmp" }

struct A
{
  int x;
  A () : x (0) {}
  int & getX ();
};

template <int> void
foo ()
{
  A a;

#pragma omp for
  for (int i = a.getX (); i < 10; ++i)
    ;
#pragma omp for
  for (int i = 0; i < a.getX (); ++i)
    ;
  a.x = 1;
#pragma omp for
  for (int i = 0; i < 10; i += a.getX ())
    ;
}

void
bar ()
{
  foo <0> ();
  foo <1> ();
}

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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