mirror of
https://github.com/autc04/Retro68.git
synced 2024-08-18 12:29:08 +00:00
23 lines
276 B
C++
23 lines
276 B
C++
|
// PR c++/24502
|
||
|
// { dg-do run }
|
||
|
|
||
|
extern "C" void abort ();
|
||
|
|
||
|
template <typename T> T
|
||
|
foo (T r)
|
||
|
{
|
||
|
T i;
|
||
|
#pragma omp for
|
||
|
for (i = 0; i < 10; i++)
|
||
|
r += i;
|
||
|
return r;
|
||
|
}
|
||
|
|
||
|
int
|
||
|
main ()
|
||
|
{
|
||
|
if (foo (0) != 10 * 9 / 2 || foo (2L) != 10L * 9 / 2 + 2)
|
||
|
abort ();
|
||
|
return 0;
|
||
|
}
|