2 ! { dg-options "-O2 -fdump-tree-optimized" }
3 ! Tests whether volatile really works for pointers
5 logical, pointer, volatile :: t1
10 if(associated(t1
)) print *, 'VolatileNotOptimizedAway'
12 if(associated(t2
)) print *, 'NonVolatileNotOptimizedAway'
14 ! { dg-final { scan-tree-dump "VolatileNotOptimizedAway" "optimized" } }
15 ! { dg-final { scan-tree-dump-not "NonVolatileNotOptimizedAway" "optimized" } }
16 ! { dg-final { cleanup-tree-dump "optimized" } }