20790697dd
PR middle-end/48591 * omp-low.c (expand_omp_atomic_fetch_op): Return false if decl is NULL. (expand_omp_atomic_pipeline): Return false if cmpxchg is NULL. * gcc.dg/gomp/pr48591.c: New test. * testsuite/libgomp.c/pr48591.c: New test. From-SVN: r172379
23 lines
409 B
C
23 lines
409 B
C
/* PR middle-end/48591 */
|
|
/* { dg-do run { target i?86-*-linux* x86_64-*-linux* ia64-*-linux* } } */
|
|
/* { dg-options "-fopenmp" } */
|
|
|
|
extern void abort (void);
|
|
|
|
int
|
|
main ()
|
|
{
|
|
__float128 f = 0.0;
|
|
int i;
|
|
#pragma omp parallel for reduction(+:f)
|
|
for (i = 0; i < 128; i++)
|
|
f += 0.5Q;
|
|
if (f != 64.0Q)
|
|
abort ();
|
|
#pragma omp atomic
|
|
f += 8.5Q;
|
|
if (f != 72.5Q)
|
|
abort ();
|
|
return 0;
|
|
}
|