public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/36462]  New: KIND argument in INDEX results in wrong code
@ 2008-06-08  1:22 fxcoudert at gcc dot gnu dot org
  2008-06-08  1:23 ` [Bug fortran/36462] " fxcoudert at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2008-06-08  1:22 UTC (permalink / raw)
  To: gcc-bugs

$ cat a.f90 
  character(10) string
  string = 'ABCDEEDCBA'
  write(*,*) index(string,'A',kind=1)
  end
$ gfortran a.f90 && ./a.out
   10

I suspect we're passing 1 as a logical BACK argument to the library function.
Well, I do more than suspect, I checked and that's indeed what we do :)

Work needed in trans-intrinsic.c, probably an easy one. Will need auditing
other intrinsics that were added a KIND argument in F2003.


-- 
           Summary: KIND argument in INDEX results in wrong code
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: fxcoudert at gcc dot gnu dot org


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


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

end of thread, other threads:[~2009-01-04  0:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-08  1:22 [Bug fortran/36462] New: KIND argument in INDEX results in wrong code fxcoudert at gcc dot gnu dot org
2008-06-08  1:23 ` [Bug fortran/36462] " fxcoudert at gcc dot gnu dot org
2008-06-08 11:21 ` burnus at gcc dot gnu dot org
2008-06-12 16:17 ` burnus at gcc dot gnu dot org
2008-06-12 16:18 ` burnus at gcc dot gnu dot org
2009-01-04  0:10 ` dfranke 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).