public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/30278]  New: Inconsistencies with backslash handling
@ 2006-12-22 15:13 tobi at gcc dot gnu dot org
  2006-12-23 12:12 ` [Bug fortran/30278] " steven at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: tobi at gcc dot gnu dot org @ 2006-12-22 15:13 UTC (permalink / raw)
  To: gcc-bugs

A testcase provided by Eef van Beveren, notice the difference between the
handling of backslash in the format string and in the regular string:
schluter@pcl247d:~/src> cat backslash.f
      call wrt('\backslash')
      call wrt('\\backslash')
      write (*,100)
      write (*,200)
      stop
 100  format ('\backslash now results in \backslash')
 200  format ('\\backslash now results in \\backslash')
      end
      subroutine wrt(a)
      character*(*) a
      lena = len(a)
      write(*,*) 'results in: ', a(1:lena)
      return
      end

schluter@pcl247d:~/src> gfortran backslash.f
schluter@pcl247d:~/src> ./a.out
 results in:ackslash
 results in: \backslash
\backslash now results in \backslash
\\backslash now results in \\backslash
schluter@pcl247d:~/src> gfortran -fno-backslash backslash.f
schluter@pcl247d:~/src> ./a.out
 results in: \backslash
 results in: \\backslash
\backslash now results in \backslash
\\backslash now results in \\backslash
schluter@pcl247d:~/src> g77 backslash.f
schluter@pcl247d:~/src> ./a.out
 results in:ackslash
 results in: \backslash
ackslash now results inackslash
\backslash now results in \backslash
schluter@pcl247d:~/src>


-- 
           Summary: Inconsistencies with backslash handling
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tobi at gcc dot gnu dot org
OtherBugsDependingO 19292
             nThis:


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-01-27 17:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-22 15:13 [Bug fortran/30278] New: Inconsistencies with backslash handling tobi at gcc dot gnu dot org
2006-12-23 12:12 ` [Bug fortran/30278] " steven at gcc dot gnu dot org
2006-12-23 12:19 ` steven at gcc dot gnu dot org
2006-12-23 12:43 ` steven at gcc dot gnu dot org
2006-12-23 12:52 ` steven at gcc dot gnu dot org
2006-12-23 13:12 ` tobi at gcc dot gnu dot org
2006-12-23 13:17 ` steven at gcc dot gnu dot org
2006-12-24  3:14 ` jvdelisle at gcc dot gnu dot org
2007-01-27 17:14 ` kargl at gcc dot gnu dot org
2007-01-27 17:16 ` kargl 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).