URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [f2c_6.f90] - Rev 816
Compare with Previous | Blame | View Log
! { 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 // zcomplex, pointer :: rcomplex, target :: zr=>zend function cfunction d()common // zcomplex, pointer :: dcomplex, target :: zd=>zend function dfunction e()common // zcomplex, pointer :: ecomplex, target :: ze=>zend function efunction f() result(r)common // zcomplex, pointer :: rcomplex, target :: zr=>zend function finterfacefunction c ()complex, pointer :: cend function cend interfaceinterfacefunction d()complex, pointer :: dend function dend interfaceinterfacefunction e () result(r)complex, pointer :: rend function eend interfaceinterfacefunction f () result(r)complex, pointer :: rend 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
