URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
// PR c++/31598
|
// PR c++/31598
|
// { dg-do compile }
|
// { dg-do compile }
|
//
|
//
|
// Copyright (C) 2007 Free Software Foundation, Inc.
|
// Copyright (C) 2007 Free Software Foundation, Inc.
|
// Contributed by Theodore.Papadopoulo
|
// Contributed by Theodore.Papadopoulo
|
// 16 Apr 2007
|
// 16 Apr 2007
|
|
|
int i;
|
int i;
|
template struct A { A() {} };
|
template struct A { A() {} };
|
template struct C { C() { i++; } C(const C &) { i += 2; } };
|
template struct C { C() { i++; } C(const C &) { i += 2; } };
|
struct D { D() {} };
|
struct D { D() {} };
|
|
|
struct M { typedef double E; };
|
struct M { typedef double E; };
|
|
|
template
|
template
|
struct R
|
struct R
|
{
|
{
|
R()
|
R()
|
{
|
{
|
typedef A B;
|
typedef A B;
|
B b;
|
B b;
|
#pragma omp parallel for firstprivate(b) schedule(guided)
|
#pragma omp parallel for firstprivate(b) schedule(guided)
|
for (int t = 0; t < 10; ++t)
|
for (int t = 0; t < 10; ++t)
|
;
|
;
|
}
|
}
|
};
|
};
|
|
|
template
|
template
|
struct S
|
struct S
|
{
|
{
|
S()
|
S()
|
{
|
{
|
typedef C B;
|
typedef C B;
|
B b;
|
B b;
|
#pragma omp parallel for firstprivate(b)
|
#pragma omp parallel for firstprivate(b)
|
for (int t = 0; t < 10; ++t)
|
for (int t = 0; t < 10; ++t)
|
;
|
;
|
}
|
}
|
};
|
};
|
|
|
struct U
|
struct U
|
{
|
{
|
U()
|
U()
|
{
|
{
|
D b;
|
D b;
|
#pragma omp parallel for firstprivate(b)
|
#pragma omp parallel for firstprivate(b)
|
for (int t = 0; t < 10; ++t)
|
for (int t = 0; t < 10; ++t)
|
;
|
;
|
}
|
}
|
};
|
};
|
|
|
int
|
int
|
main ()
|
main ()
|
{
|
{
|
R r;
|
R r;
|
S s;
|
S s;
|
U u;
|
U u;
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.