OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [gomp/] [atomic-5.c] - Rev 298

Compare with Previous | Blame | View Log

/* { dg-do compile } */
 
int x;
const int y;
int bar(void);
 
void f1(void)
{
  register int z;
 
  #pragma omp atomic
    x %= 2;		/* { dg-error "invalid operator" } */
  #pragma omp atomic
    x = x + 1;		/* { dg-error "invalid operator" } */
  #pragma omp atomic
    x = 1;		/* { dg-error "invalid operator" } */
  #pragma omp atomic
    ++y;		/* { dg-error "read-only variable" } */
  #pragma omp atomic
    y--;		/* { dg-error "read-only variable" } */
  #pragma omp atomic
    y += 1;		/* { dg-error "read-only variable" } */
  #pragma omp atomic
    z += 1;		/* { dg-error "register variable" } */
  #pragma omp atomic
    bar();		/* { dg-error "invalid operator" } */
  #pragma omp atomic
    bar() += 1;		/* { dg-error "lvalue required" } */
  #pragma omp atomic a	/* { dg-error "expected end of line" } */
    x++;
  #pragma omp atomic
    ;			/* { dg-error "expected expression" } */
  #pragma omp atomic
  #pragma omp atomic	/* { dg-error "expected expression" } */
    ;
  /* Check that we didn't get stuck on the pragma eol marker.  */
  undef;		/* { dg-error "" } */
  /* { dg-message "undeclared identifier is reported only once" "reminder" { target *-*-* } 37 } */
}
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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