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

Subversion Repositories openrisc

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

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

// PR c++/32177
// { dg-do compile }
// { dg-options "-fopenmp" }
//
// Copyright (C) 2007 Free Software Foundation, Inc.
// Contributed by Theodore.Papadopoulo 1 Jun 2007 <Theodore.Papadopoulo@sophia.inria.fr>

struct A
{
  A () {}
  ~A () {}
  int s () const { return 1; }
};

void
f1 ()
{
  #pragma omp parallel for
    for (int i = 1; i <= A ().s (); ++i)
      ;
}

void
f2 ()
{
  #pragma omp parallel for
    for (int i = A ().s (); i <= 20; ++i)
      ;
}

void
f3 ()
{
  #pragma omp parallel for
    for (int i = 1; i <= 20; i += A ().s ())
      ;
}

void
f4 ()
{
  int i;
  #pragma omp parallel for
    for (i = A ().s (); i <= 20; i++)
      ;
}

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.