view gcc/testsuite/gcc.dg/gomp/pr89796.c @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 1830386684a0
children
line wrap: on
line source

/* PR c++/89796 */
/* { dg-do compile } */
/* { dg-additional-options "-Wunused-value" } */

int
f1 (int *p)
{
  int r;
  #pragma omp atomic capture		/* { dg-bogus "value computed is not used" } */
  { r = *p; (*p)++; }
  return r;
}

int
f2 (int *p)
{
  int s
    = ({ int r;
	 #pragma omp atomic capture	/* { dg-bogus "value computed is not used" } */
	 { r = *p; (*p)++; }
	 r; });
  return s;
}