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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [gomp/] [atomic-5.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
 
3
int x;
4
const int y;
5
int bar(void);
6
 
7
void f1(void)
8
{
9
  register int z;
10
 
11
  #pragma omp atomic
12
    x %= 2;             /* { dg-error "invalid operator" } */
13
  #pragma omp atomic
14
    x = x + 1;
15
  #pragma omp atomic
16
    x = 1;              /* { dg-error "invalid form" } */
17
  #pragma omp atomic
18
    ++y;                /* { dg-error "read-only variable" } */
19
  #pragma omp atomic
20
    y--;                /* { dg-error "read-only variable" } */
21
  #pragma omp atomic
22
    y += 1;             /* { dg-error "read-only variable" } */
23
  #pragma omp atomic
24
    z += 1;             /* { dg-error "register variable" } */
25
  #pragma omp atomic
26
    bar();              /* { dg-error "invalid operator" } */
27
  #pragma omp atomic
28
    bar() += 1;         /* { dg-error "lvalue required" } */
29
  #pragma omp atomic a  /* { dg-error "expected end of line" } */
30
    x++;
31
  #pragma omp atomic
32
    ;                   /* { dg-error "expected expression" } */
33
  #pragma omp atomic
34
  #pragma omp atomic    /* { dg-error "expected expression" } */
35
    ;
36
  /* Check that we didn't get stuck on the pragma eol marker.  */
37
  undef;                /* { dg-error "" } */
38
  /* { dg-message "undeclared identifier is reported only once" "reminder" { target *-*-* } 37 } */
39
}

powered by: WebSVN 2.1.0

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