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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [gomp/] [for-16.C] - Rev 751

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

// { dg-do compile }

template<typename T>
void foo ()
{
#pragma omp for
  for (unsigned int i = 0; i < 10; i++);
#pragma omp for
  for (int j = 0; ; j++); // { dg-error "missing controlling predicate" }
#pragma omp for
  for (int k = 0; k == 1; k++); // { dg-error "invalid controlling predicate" }
#pragma omp for
  for (int l = 0; l < 10; ); // { dg-error "missing increment expression" }
#pragma omp for
  for (int m = 0; m < 10; m *= 3); // { dg-error "invalid increment expression" }
#pragma omp for
  for (T n = 0; ; n++); // { dg-error "missing controlling predicate" }
#pragma omp for
  for (T o = 0; o == 1; o++); // Error here is emitted only during
                              // instantiation
#pragma omp for
  for (T p = 0; p < 10; ); // { dg-error "missing increment expression" }
#pragma omp for
  for (T q = 0; q < 10; q *= 3); // Error here is emitted only during
                                 // instantiation
}

void bar ()
{
#pragma omp for
  for (int m = 0; m < 10; m *= 3); // { dg-error "invalid increment expression" }
}

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.