This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libfortran/27046] [mingw32] mixed C-Fortran I/O doesn't flush



------- Comment #5 from fxcoudert at gcc dot gnu dot org  2006-06-12 16:30 -------
This is not DLL-related, the following code doesn't have the expected behaviour
(although it works fine on i686-linux, even in the static case):

$ cat ctesti.c 
#include <stdio.h>

void print_from_gcc(char* txt) {
  printf("%s\n",txt);
}

int main(int argc, char** argv) {
  print_from_gcc     ("c");
  print_from_gfortran_("f");
  print_from_gcc     ("c");
  print_from_gfortran_("f");

  return 0;
}
$ cat ftesti.f90 
subroutine print_from_gfortran(txt)
  implicit none
  character :: txt
  print *,txt
end subroutine print_from_gfortran
$ ../gfortran/bin/gfortran.exe ftesti.f90 ctesti.c
$ ./a.exe 
c
c
 f
 f


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2006-05-21 14:03:39         |2006-06-12 16:30:13
               date|                            |
            Summary|[mingw32] gfortran print    |[mingw32] mixed C-Fortran
                   |flush in dll                |I/O doesn't flush


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27046


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]