Hello world, I have just pushed the attched patch to the branch. With this patch, the program tkoenig@gcc-fortran:~/Tst$ cat write_env.f90 program main real(kind=16) :: x character (len=30) :: conv x = 1/3._16 open (10,file="out.dat",status="replace",access="stream",form="unformatted") inquire(10,convert=conv) print *,conv write (10) 1/3._16 end program main gives the result: tkoenig@gcc-fortran:~/Tst$ GFORTRAN_CONVERT_UNIT="r16_ibm:10" ./a.out && od -w64 -t x1 out.dat LITTLE_ENDIAN,R16_IBM 0000000 55 55 55 55 55 55 d5 3f 56 55 55 55 55 55 75 3c 0000020 tkoenig@gcc-fortran:~/Tst$ GFORTRAN_CONVERT_UNIT="r16_ieee:10" ./a.out && od -w64 -t x1 out.dat LITTLE_ENDIAN,R16_IEEE 0000000 80 55 55 55 55 55 55 55 55 55 55 55 55 55 fd 3f 0000020 tkoenig@gcc-fortran:~/Tst$ GFORTRAN_CONVERT_UNIT="big_endian:10;r16_ieee:10" ./a.out && od -w64 -t x1 out.dat BIG_ENDIAN,R16_IEEE 0000000 3f fd 55 55 55 55 55 55 55 55 55 55 55 55 55 80 0000020 so things look OK. In the next few days, I will do a bit more testing to see if I have missed any corner cases. So, the only thing missing is handling of the options, but I think that is not critical (and could be added later; two separate possibilities might just be enough for most users :-) So... time to merge the branch into trunk before stage 4 kicks in? Best regards Thomas Handle R16 conversion for POWER in the environment variables. This patch handles the environment variables for the REAL(KIND=16) variables like for the little/big-endian routines, so users without who have no access to the source or are unwilling to recompile can use this. Syntax is, for example GFORTRAN_CONVERT_UNIT="r16_ieee:10;little_endian:10" ./a.out libgfortran/ChangeLog: * runtime/environ.c (R16_IEEE): New macro. (R16_IBM): New macro. (next_token): Handle IBM R16 conversion cases. (push_token): Likewise. (mark_single): Likewise. (do_parse): Likewise, initialize endian.