public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "grrogers at umd dot edu" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/23097] New: non-printable output from write with certain formats Date: Wed, 27 Jul 2005 17:21:00 -0000 [thread overview] Message-ID: <20050727171825.23097.grrogers@umd.edu> (raw) [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
next reply other threads:[~2005-07-27 17:18 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-07-27 17:21 grrogers at umd dot edu [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20050727171825.23097.grrogers@umd.edu \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).