URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [proc_assign_1.f90] - Rev 816
Compare with Previous | Blame | View Log
! { dg-do compile }! This tests the patch for PR26787 in which it was found that setting! the result of one module procedure from within another produced an! ICE rather than an error.!! This is an "elaborated" version of the original testcase from! Joshua Cogliati <jjcogliati-r1@yahoo.com>!function ext1 ()integer ext1, ext2, argext1 = 1entry ext2 (arg)ext2 = argcontainssubroutine int_1 ()ext1 = arg * arg ! OK - host associated.end subroutine int_1end function ext1module simpleimplicit nonecontainsinteger function foo ()foo = 10 ! OK - function resultcall foobar ()containssubroutine foobar ()integer zfoo = 20 ! OK - host associated.end subroutine foobarend function foosubroutine bar() ! This was the original bug.foo = 10 ! { dg-error "is not a VALUE" }end subroutine barinteger function oh_no ()oh_no = 1foo = 5 ! { dg-error "is not a VALUE" }end function oh_noend module simplemodule simplerimplicit nonecontainsinteger function foo_er ()foo_er = 10 ! OK - function resultend function foo_erend module simpleruse simplerreal w, stmt_fcninterfacefunction ext1 ()integer ext1end function ext1function ext2 (arg)integer ext2, argend function ext2end interfacestmt_fcn (w) = sin (w)call x (y ())x = 10 ! { dg-error "Expected VARIABLE" }y = 20 ! { dg-error "is not a VALUE" }foo_er = 8 ! { dg-error "is not a VALUE" }ext1 = 99 ! { dg-error "is not a VALUE" }ext2 = 99 ! { dg-error "is not a VALUE" }stmt_fcn = 1.0 ! { dg-error "Expected VARIABLE" }w = stmt_fcn (1.0)containssubroutine x (i)integer iy = i ! { dg-error "is not a VALUE" }end subroutine xfunction y ()integer yy = 2 ! OK - function resultend function yend! { dg-final { cleanup-modules "simple simpler" } }
