public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/35940]  New: Array BACK ignored in INDEX intrinsic when other args scalar
@ 2008-04-14 21:47 dick dot hendrickson at gmail dot com
  2008-04-14 21:50 ` [Bug fortran/35940] " dick dot hendrickson at gmail dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: dick dot hendrickson at gmail dot com @ 2008-04-14 21:47 UTC (permalink / raw)
  To: gcc-bugs

The following gives the wrong answers.  It may have to do
with broadcasting things to arrays.  The all scalar case works
and an array first argument works.

      program FA1031

! fails on Windows XP
! gcc version 4.4.0 20080312 (experimental) [trunk revision 133139]

      INTEGER IDA1(10)
      LOGICAL GDA1(10)

      IDA1   = 0
      gda1 = (/ (i/2*2 .ne. I, i=1,10) /)
      print '(10L2)', gda1

      IDA1 = INDEX ( 'DEFDEF' , 'DEF', GDA1 )    !fails
      print '(10I2)', ida1

      IDA1 = INDEX ( (/ ('DEFDEF',i=1,10) /) , 'DEF', GDA1 )    !works
      print '(10I2)', ida1

      IDA = INDEX ( 'DEFDEF' , 'DEF', .true. )   !works
      print '(I2)', ida

      END


-- 
           Summary: Array BACK ignored in INDEX intrinsic when other args
                    scalar
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dick dot hendrickson at gmail dot com


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


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

end of thread, other threads:[~2008-05-12 18:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-14 21:47 [Bug fortran/35940] New: Array BACK ignored in INDEX intrinsic when other args scalar dick dot hendrickson at gmail dot com
2008-04-14 21:50 ` [Bug fortran/35940] " dick dot hendrickson at gmail dot com
2008-04-16 18:10 ` tkoenig at gcc dot gnu dot org
2008-04-16 18:16 ` tkoenig at gcc dot gnu dot org
2008-04-29 19:24 ` bdavis at gcc dot gnu dot org
2008-04-30  0:01 ` jvdelisle at gcc dot gnu dot org
2008-04-30  0:54 ` bdavis at gcc dot gnu dot org
2008-04-30  0:56 ` bdavis at gcc dot gnu dot org
2008-05-12 18:02 ` fxcoudert 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).