URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [entry_6.f90] - Rev 816
Compare with Previous | Blame | View Log
! { dg-do run }! Tests the fix for PR24558, which reported that module! alternate function entries did not work.!! Contributed by Erik Edelmann <eedelman@gcc.gnu.org>!module foocontainsfunction n1 (a)integer :: n1, n2, a, binteger, save :: cc = an1 = c**3returnentry n2 (b)n2 = c * bn2 = n2**2returnend function n1function z1 (u)complex :: z1, z2, u, vz1 = (1.0, 2.0) * ureturnentry z2 (v)z2 = (3, 4) * vreturnend function z1function n3 (d)integer :: n3, dn3 = n2(d) * n1(d) ! Check sibling references.returnend function n3function c1 (a)character(4) :: c1, c2, a, bc1 = aif (a .eq. "abcd") c1 = "ABCD"returnentry c2 (b)c2 = bif (b .eq. "wxyz") c2 = "WXYZ"returnend function c1end module foouse fooif (n1(9) .ne. 729) call abort ()if (n2(2) .ne. 324) call abort ()if (n3(19) .ne. 200564019) call abort ()if (c1("lmno") .ne. "lmno") call abort ()if (c1("abcd") .ne. "ABCD") call abort ()if (c2("lmno") .ne. "lmno") call abort ()if (c2("wxyz") .ne. "WXYZ") call abort ()if (z1((3,4)) .ne. (-5, 10)) call abort ()if (z2((5,6)) .ne. (-9, 38)) call abort ()end! { dg-final { cleanup-modules "foo" } }
