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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [gomp/] [for-19.C] - Blame information for rev 774

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

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/38348
2
// { dg-do compile }
3
// { dg-options "-fopenmp" }
4
 
5
const char *p = "abcde";
6
 
7
template 
8
void
9
f1 (void)
10
{
11
#pragma omp for         // { dg-error "forbids incrementing a pointer of type" }
12
  for (void *q = (void *)p; q < (void *) (p + 4); q++)  // { dg-error "forbids incrementing a pointer of type" }
13
    ;
14
}
15
 
16
template 
17
void
18
f2 (void)
19
{
20
#pragma omp for
21
  for (const char *q = p; q < p + 4; q++)
22
    ;
23
}
24
 
25
template 
26
void
27
f3 (void)
28
{
29
#pragma omp for         // { dg-error "forbids incrementing a pointer of type" }
30
  for (T q = T (p); q < T (p + 4); q++)
31
    ;
32
}
33
 
34
int
35
main (void)
36
{
37
  f1  ();               // { dg-message "required from here" }
38
  f2  ();
39
  f3  ();
40
  f3  ();       // { dg-message "required from here" }
41
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.