https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61251
Bug ID: 61251 Summary: Hang in write from inside a function Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: peter.machon at arcor dot de Writing from a functions stops execution of programs. ********************** Simple code: program test write(*,*) f(3e0) contains function f(x) real :: f,x write(*,*)x f=2e0*x end function end program ********************* The write function inside the function f(x) causes the hang. Sorry if it is supposed to be like this. But with e.g. the PGI compiler it works fine. I'm working with MacOSX 10.6.8 and a self-build gcc, downloaded from the gnu page. gfortran -v : Using built-in specs. COLLECT_GCC=gfortran COLLECT_LTO_WRAPPER=/Users/pm/bin/gcc_4.8.2/libexec/gcc/x86_64-apple-darwin10.8.0/4.8.2/lto-wrapper Target: x86_64-apple-darwin10.8.0 Configured with: ./configure --prefix=/Users/pm/bin/gcc_4.8.2/ Thread model: posix gcc version 4.8.2 (GCC)