fortran/7388: Incorrect output with 0 based array of characters.
Toon@sources.redhat.com
Toon@sources.redhat.com
Tue Jul 23 15:54:00 GMT 2002
>Number: 7388
>Category: fortran
>Synopsis: Incorrect output with 0 based array of characters.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jul 23 13:36:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Toon Moene <toon@moene.indiv.nluug.nl
>Release: 3.1
>Organization:
>Environment:
Linux, probably unimportant
>Description:
This code:
character*256 buff(0:10)
character*80 strings(10)
integer i,m1,m2
i = 1
m1 = 1
m2 = 7
buff(i) = 'tcase0a'
strings(i) = buff(i)(m1:m2)
write(*,*)buff(i)
write(*,*)buff(i)(m1:m2)
write(*,*)strings(i)
stop
end
should print "tcase0a" three times, the first time with 248
blanks attached.
However, with 'g77 [other options] -fbounds-check' it
doesn't.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list