Hi,

this program is btw invalid, you know? You aren't allowed to access in
fun1 the same I/O unit (unit=* is OUTPUT_UNIT).

"An input/output statement that is executed while another input/output
statement is being executed is a recursive input/output statement. A
recursive input/output statement shall not identify an external unit
that is identified by another input/output statement being executed
except that a child data transfer statement may identify its parent
data transfer statement external unit." (F2008,9.12 Restrictions on
input/output statements)

Regards,
Kai

2012/1/6 xunxun <[email protected]>:
> Hi, all
>
>     My friend found a MinGW/MinGW64 Gfortran program io dead lock issue. I
> found that the problem is gone on Cygwin GFortran or Linux GFortran, I don't
> know it's related with MinGW/MinGW64 CRT or Gfortran source code. I test
> 4.5-4.6 series gfortran, all have this question.
>
> The test code :
>
> ------------------------------------------------------------
> !main.f90
>
> program main
>     integer :: ret
>     integer :: fun1
>     integer :: myfun1
>     ret=fun1()
>     write(*,*) ret     ! ok:)
>     write(*,*) fun1() ! death!
> end program
>
> function fun1()
>     integer fun1
>     write(*,*)1.0
>     fun1=1
>     write(*,*) "fun1 end!"
> end function
>
> ------------------------------------------------------------
>
> When I use Cygwin GFortran to build it
> i686-pc-cygwin-gfortran main.f90
>
> a.exe will output
> -----------------
>    1.0000000
>  fun1 end!
>            1
>    1.0000000
>  fun1 end!
>            1
> -----------------
> it works well
>
>
> i686-w64-mingw32-gfortran main.f90
> -----------------
>    1.0000000
>  fun1 end!
>            1     ---> Dead here
> -----------------
>
> i686-pc-mingw32-gfortran is the same.
>
>     May anyone look through the problem?
>
>     Thanks.
>
> --
> Best Regards,
> xunxun
>
>
> ------------------------------------------------------------------------------
> Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
> infrastructure or vast IT resources to deliver seamless, secure access to
> virtual desktops. With this all-in-one solution, easily deploy virtual
> desktops for less than the cost of PCs and save 60% on VDI infrastructure
> costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
> _______________________________________________
> Mingw-w64-public mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>



-- 
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to