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 717

Go to most recent revision | 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> ();
}

Go to most recent revision | 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.