1*404b540aSrobert! PR middle-end/28790 2*404b540aSrobert! { dg-do run } 3*404b540aSrobert 4*404b540aSrobertprogram nestomp 5*404b540aSrobert integer :: j 6*404b540aSrobert j = 8 7*404b540aSrobert call bar 8*404b540aSrobert if (j.ne.10) call abort 9*404b540aSrobertcontains 10*404b540aSrobert subroutine foo (i) 11*404b540aSrobert integer :: i 12*404b540aSrobert !$omp atomic 13*404b540aSrobert j = j + i - 5 14*404b540aSrobert end subroutine 15*404b540aSrobert subroutine bar 16*404b540aSrobert use omp_lib 17*404b540aSrobert integer :: i 18*404b540aSrobert i = 6 19*404b540aSrobert call omp_set_dynamic (.false.) 20*404b540aSrobert !$omp parallel num_threads (2) 21*404b540aSrobert call foo(i) 22*404b540aSrobert !$omp end parallel 23*404b540aSrobert end subroutine 24*404b540aSrobertend 25