public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/23097] New: non-printable output from write with certain formats
@ 2005-07-27 17:21 grrogers at umd dot edu
2005-07-27 17:32 ` [Bug libfortran/23097] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-07-27 17:32 ` pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: grrogers at umd dot edu @ 2005-07-27 17:21 UTC (permalink / raw)
To: gcc-bugs
[casper@ARROW test_blas]$ ~/GREG/bin_gcc/bin/gfortran -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc4/configure --prefix=/home/casper/GREG/bin_gcc --
mandir=/home/casper/GREG/objdir/share/man --enable-
languages=c,c++,f95,java,objc --enable-shared --enable-threads=posix --with-
mpfr=/home/casper/GREG/f90_prereq --with-gmp=/home/casper/GREG/f90_prereq :
(reconfigured) ../gcc4/configure --prefix=/home/casper/GREG/bin_gcc --enable-
threads --with-gmp=/home/casper/GREG/f90_prereq --with-
mpfr=/home/casper/GREG/f90_prereq
Thread model: posix
gcc version 4.1.0 20050719 (experimental)
[casper@ARROW test_blas]$ uname -a
Linux ARROW 2.4.20-8bigmem #1 SMP Thu Mar 13 17:32:29 EST 2003 i686 i686 i386
GNU/Linux
[casper@ARROW test_blas]$ cat test_io.f90
PROGRAM TEST_IO
INTEGER :: A = 12, B = 109
! actual data not important
WRITE(*,100)A,B
WRITE(*,101)A,B
100 FORMAT(/,2X,I5,/2X,I5)
101 FORMAT(2(/,3X,I5))
END PROGRAM TEST_IO
[casper@ARROW test_blas]$ ~/GREG/bin_gcc/bin/gfortran test_io.f90 -static
[casper@ARROW test_blas]$ ./a.out
12
109
12
109
-----------------------------------------------------------------
As you can see this is the expected normal behavior, but if you redirect the
output by either piping to something like less, or to a file then editing with
say:
[casper@ARROW test_blas]$ ./a.out > junk; vi junk
the file becomes:
12
^@^@ 109
12
^@^@^@ 109
------------------------------------------------------------------
the ^@ characters are supposed to be the blanks that the #X outputs. As you
can see it prints some odd character instead. This only happens after you
make a newline with /, otherwise it works as normal. If you have a single
format statement with multiple /2X statements like format 101 above, the first
one works correctly, all others after this exibit the bug.
--
Summary: non-printable output from write with certain formats
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: grrogers at umd dot edu
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23097
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-07-27 17:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-27 17:21 [Bug fortran/23097] New: non-printable output from write with certain formats grrogers at umd dot edu
2005-07-27 17:32 ` [Bug libfortran/23097] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-07-27 17:32 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).