https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92899
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Fri Dec 20 17:42:22 2019 New Revision: 279672 URL: https://gcc.gnu.org/viewcvs?rev=279672&root=gcc&view=rev Log: Backported from mainline 2019-12-11 Jakub Jelinek <ja...@redhat.com> PR fortran/92899 * trans-openmp.c (gfc_trans_omp_atomic): For GFC_OMP_ATOMIC_SWAP, do look through conversion on expr2 if any. * testsuite/libgomp.fortran/atomic1.f90: New test. Added: branches/gcc-9-branch/libgomp/testsuite/libgomp.fortran/atomic1.f90 Modified: branches/gcc-9-branch/gcc/fortran/ChangeLog branches/gcc-9-branch/gcc/fortran/trans-openmp.c branches/gcc-9-branch/gcc/testsuite/ChangeLog branches/gcc-9-branch/libgomp/ChangeLog