Commit 6a97d9ea by Tobias Burnus

[Fortran] Disable front-end optimization for OpenACC atomic (PR93462)

        PR fortran/93462
        * frontend-passes.c (gfc_code_walker): For EXEC_OACC_ATOMIC, set
        in_omp_atomic to true prevent front-end optimization.

        PR fortran/93462
        * gfortran.dg/goacc/atomic-1.f90: New.
parent e60b1e23
2020-01-31 Tobias Burnus <tobias@codesourcery.com>
PR fortran/93462
* frontend-passes.c (gfc_code_walker): For EXEC_OACC_ATOMIC, set
in_omp_atomic to true prevent front-end optimization.
2020-01-30 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
PR fortran/87103
......
......@@ -5258,6 +5258,7 @@ gfc_code_walker (gfc_code **c, walk_code_fn_t codefn, walk_expr_fn_t exprfn,
WALK_SUBEXPR (co->ext.dt->extra_comma);
break;
case EXEC_OACC_ATOMIC:
case EXEC_OMP_ATOMIC:
in_omp_atomic = true;
break;
......
2020-01-31 Tobias Burnus <tobias@codesourcery.com>
PR fortran/93462
* gfortran.dg/goacc/atomic-1.f90: New.
2020-01-31 Tamar Christina <tamar.christina@arm.com>
PR rtl-optimization/91838
......
! { dg-do compile }
!
! PR fortran/93462
!
! Contributed by G. Steinmetz
!
program p
integer :: n = 1
integer :: a
!$acc atomic write
a = f(n) - f(n)
contains
integer function f(x)
integer, intent(in) :: x
f = x
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment