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