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

Subversion Repositories openrisc

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

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

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

template<int>
void
f1 ()
{
#pragma omp parallel for
  for (int i = ""; i < 4; ++i)  // { dg-error "invalid conversion from" }
    ;
}

template<int>
void
f2 ()
{
  int i;
#pragma omp parallel for
  for (i = ""; i < 4; ++i)      // { dg-error "invalid conversion from" }
    ;
}

template<typename T>
void
f3 ()
{
#pragma omp parallel for
  for (T i = ""; i < 4; ++i)    // { dg-error "invalid conversion from" }
    ;
}

template<typename T>
void
f4 ()
{
  T i;
#pragma omp parallel for
  for (i = ""; i < 4; ++i)      // { dg-error "invalid conversion from" }
    ;
}

void
bar ()
{
  f1<0> ();                      // { dg-message "required from here" }
  f2<1> ();                     // { dg-message "required from here" }
  f3<int> ();                   // { dg-message "required from here" }
  f4<int> ();                   // { dg-message "required from here" }
}

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.