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/30525] New: character comparisons with padding


The results should be consistent.  g77
gets this right.

$ cat char-comparison.f
      program main
      character*2 c2
      character*1 c1, c3, c4
C
C  Comparison between char(255) and space padding
C
      c2 = 'a' // char(255)
      c1 = 'a'
      print *, c2 .gt. c1
C
C  Comparison between char(255) and space
C
      c3 = ' '
      c4 = char(255)
      print *,c4 .gt. c3
      end
$ gfortran char-comparison.f && ./a.out
 F
 T
$ g77 char-comparison.f && ./a.out
 T
 T


-- 
           Summary: character comparisons with padding
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: libfortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tkoenig at gcc dot gnu dot org
OtherBugsDependingO 19292
             nThis:


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


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