4886ec8e70
PR c/64824 PR c/64868 gcc/c/ * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR. gcc/cp/ * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR. gcc/c-family/ * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR instead of RDIV_EXPR. Use build_binary_op instead of build2_loc. libgomp/ * testsuite/libgomp.c/pr64824.c: New test. * testsuite/libgomp.c/pr64868.c: New test. * testsuite/libgomp.c++/pr64824.C: New test. * testsuite/libgomp.c++/pr64868.C: New test. From-SVN: r220420
17 lines
248 B
C
17 lines
248 B
C
/* PR c/64824 */
|
|
/* { dg-do run } */
|
|
/* { dg-options "-O2 -fopenmp" } */
|
|
|
|
int
|
|
main ()
|
|
{
|
|
long long a;
|
|
long long b = 1LL;
|
|
int c = 3;
|
|
#pragma omp atomic capture
|
|
a = b = c << b;
|
|
if (b != 6LL || a != 6LL)
|
|
__builtin_abort ();
|
|
return 0;
|
|
}
|