⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 f2c_6.f90

📁 linux下编程用 编译软件
💻 F90
字号:
! { dg-do run }! { dg-options "-ff2c" }! Verifies that complex pointer results work with -ff2c! try all permutations of result clause in function yes/no!                     and result clause in interface yes/no! this is not possible in Fortran 77, but this exercises a previously! buggy codepathfunction c() result (r)  common // z  complex, pointer :: r  complex, target :: z  r=>zend function cfunction d()  common // z  complex, pointer :: d  complex, target :: z  d=>zend function dfunction e()  common // z  complex, pointer :: e  complex, target :: z  e=>zend function efunction f() result(r)  common // z  complex, pointer :: r  complex, target :: z  r=>zend function finterface   function c     complex, pointer :: c   end function cend interfaceinterface   function d     complex, pointer :: d   end function dend interfaceinterface   function e result(r)     complex, pointer :: r   end function eend interfaceinterface   function f result(r)     complex, pointer :: r   end function fend interfacecommon // zcomplex, target :: zcomplex, pointer :: pz = (1.,0.)p => c()z = (2.,0.)if (p /= z) call abort ()NULLIFY(p)p => d()z = (3.,0.)if (p /= z) call abort ()NULLIFY(p)p => e()z = (4.,0.)if (p /= z) call abort ()NULLIFY(p)p => f()z = (5.,0.)if (p /= z) call abort ()end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -