blob: 7bf61945b2eeb56f63ed0518980ae31d7722d5e1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
// 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 "instantiated from here" }
f2<1> (); // { dg-message "instantiated from here" }
f3<int> (); // { dg-message "instantiated from here" }
f4<int> (); // { dg-message "instantiated from here" }
}
|