Hi, This patch fixes a some runtime issues when dealing with the deviceptr clause in Fortran. There were some corner cases that were not being dealt with correctly, and the patch resolves these. Also a new set of test cases has been added. I've applied this patch to gomp-4_0-branch. Jim