This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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 in FORALL?


The following code:

! tests FORALL statements with a mask
program forall_8
  real, dimension (5, 5, 5, 5) :: a

  a (:, :, :, :) = 4

  forall (i = 1:5, j = 1:5, k = 1:5, any (a (i, j, k, :) .gt. 6))
    forall (l = 1:5, any (a (:, :, :, l) .lt. 2))
      a (i, j, k, l) = i - j + k - l
    end forall
  end forall

end

gives with gfortran version 4.3.0 20070105:

forall10_red.f90:8.20:

    forall (l = 1:5, any (a (:, :, :, l) .lt. 2))
                   1
Error: 'any' at (1) is not a function
forall10_red.f90:8.20:

    forall (l = 1:5, any (a (:, :, :, l) .lt. 2))
                   1
Error: FORALL mask clause at (1) requires a LOGICAL expression
forall10_red.f90:7.36:

  forall (i = 1:5, j = 1:5, k = 1:5, any (a (i, j, k, :) .gt. 6))
                                   1
Error: 'any' at (1) is not a function
forall10_red.f90:7.36:

  forall (i = 1:5, j = 1:5, k = 1:5, any (a (i, j, k, :) .gt. 6))
                                   1
Error: FORALL mask clause at (1) requires a LOGICAL expression

If I recall correctly, this bug was supposed to be fixed, isn't it?

TIA

Dominique

PS this was on PPC OSX 10.3, on AMD64 linux version 4.3.0 20061210
I get:

/tmp/ccwGPWn6.s: Assembler messages:
/tmp/ccwGPWn6.s:2: Error: junk at end of line, first unrecognized character is `('
/tmp/ccwGPWn6.s:5: Error: unrecognized symbol type ""
/tmp/ccwGPWn6.s:5: Error: junk at end of line, first unrecognized character is `('
/tmp/ccwGPWn6.s:6: Error: expected comma after name `__' in .size directive
/tmp/ccwGPWn6.s:7: Error: invalid character '_' in mnemonic

[scala] test/fortran> as --version
GNU assembler 2.15.91.0.2 20040727 (SuSE Linux)
Copyright 2002 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
This assembler was configured for a target of `x86_64-suse-linux'.


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