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

Subversion Repositories openrisc

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

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

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

powered by: WebSVN 2.1.0

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