Mercurial > hg > CbC > CbC_gcc
diff gcc/testsuite/gfortran.dg/module_procedure_3.f90 @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gcc/testsuite/gfortran.dg/module_procedure_3.f90 Mon May 25 07:50:57 2020 +0900 @@ -0,0 +1,27 @@ +! { dg-do run } +! +! PR fortran/94348 +! +! Contributed by Damian Rouson + +module foo_module + implicit none + + interface + module function foo() result(bar) + implicit none + integer bar + end function + end interface + +contains + module procedure foo + bar = 5 + end procedure +end module + +program main + use foo_module + implicit none + if (foo() /= 5) stop 1 +end program main