volatile5.f90
来自「用于进行gcc测试」· F90 代码 · 共 44 行
F90
44 行
! { dg-do compile }! { dg-options "-O3 -fdump-tree-optimized" }! Tests whether volatile really works with modules! PR fortran/29601module volmod implicit none integer, volatile :: a logical :: b,c volatile :: bcontains subroutine sample a = 33. if(a /= 432) print *,'aPresent' b = .false. if(b) print *,'bPresent' c = .false. if(c) print *,'cPresent' end subroutine sampleend module volmodprogram main use volmod implicit none a = 432 if(a /= 432) print *,'aStillPresent' b = .false. if(b) print *,'bStillPresent' c = .false. if(c) print *,'cStillPresent'end program main! { dg-final { scan-tree-dump "aPresent" "optimized" } }! { dg-final { scan-tree-dump "bPresent" "optimized" } }! { dg-final { scan-tree-dump "aStillPresent" "optimized" } }! { dg-final { scan-tree-dump "bStillPresent" "optimized" } }! { dg-final { scan-tree-dump-not "cPresent" "optimized" } }! { dg-final { scan-tree-dump-not "cStillPresent" "optimized" } }! { dg-final { cleanup-tree-dump "optimized" } }! { dg-final { cleanup-modules "volmod" } }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?