diff options
author | Francois-Xavier Coudert <coudert@clipper.ens.fr> | 2005-10-30 13:48:52 +0100 |
---|---|---|
committer | François-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2005-10-30 12:48:52 +0000 |
commit | 159840cb8aef55bf2f4068f109ad6f987f31abeb (patch) | |
tree | bc65843092bd8c38d837724dae7a759a0d4c5e3e /gcc | |
parent | 0d519038a0354f983534037fd9a7d460421e4fd0 (diff) | |
download | gcc-159840cb8aef55bf2f4068f109ad6f987f31abeb.zip gcc-159840cb8aef55bf2f4068f109ad6f987f31abeb.tar.gz gcc-159840cb8aef55bf2f4068f109ad6f987f31abeb.tar.bz2 |
re PR libfortran/20179 (cannot mix C and Fortran I/O)
PR libfortran/20179
* io/unix.c (flush_if_preconnected): New function.
* io/io.h: Add prototype for flush_if_preconnected.
* io/transfer.c (data_transfer_init): Use flush_if_preconnected
to workaround buggy mixed C-Fortran code.
* gfortran.dg/mixed_io_1.f90: New test.
* gfortran.dg/mixed_io_1.c: New file.
From-SVN: r106017
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/mixed_io_1.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/mixed_io_1.f90 | 5 |
3 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e76658c..802b4c6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2005-10-30 Francois-Xavier Coudert <coudert@clipper.ens.fr> + + PR libfortran/20179 + * gfortran.dg/mixed_io_1.f90: New test. + * gfortran.dg/mixed_io_1.c: New file. + +2005-10-30 Francois-Xavier Coudert <coudert@clipper.ens.fr> + + * gfortran.dg/malloc_free_1.f90: New test. + 2005-10-29 Hans-Peter Nilsson <hp@axis.com> * gcc.dg/nested-func-4.c: Require profiling -pg. diff --git a/gcc/testsuite/gfortran.dg/mixed_io_1.c b/gcc/testsuite/gfortran.dg/mixed_io_1.c new file mode 100644 index 0000000..0f8d9cd --- /dev/null +++ b/gcc/testsuite/gfortran.dg/mixed_io_1.c @@ -0,0 +1,4 @@ +#include <stdio.h> +void cio_(void){ + printf("12345"); +} diff --git a/gcc/testsuite/gfortran.dg/mixed_io_1.f90 b/gcc/testsuite/gfortran.dg/mixed_io_1.f90 new file mode 100644 index 0000000..0dc985c --- /dev/null +++ b/gcc/testsuite/gfortran.dg/mixed_io_1.f90 @@ -0,0 +1,5 @@ +! { dg-do run } +! { dg-additional-sources mixed_io_1.c } + call cio + write(*,"(A)") '6789' ! { dg-output "123456789" } + end |