public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/30400]  New: ANY not accepted as mask in FORALL
@ 2007-01-07  0:46 dominiq at lps dot ens dot fr
  2007-01-07  6:40 ` [Bug fortran/30400] " pault at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: dominiq at lps dot ens dot fr @ 2007-01-07  0:46 UTC (permalink / raw)
  To: gcc-bugs

On OSX 10.3 PPC with gfortran version 4.3.0 20070105, 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:

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

On AMD64 with gfortran version 4.3.0 20061231, 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

As noticed by Paul Thomas:

A temporary workaround is to enclose the mask expression in 
parentheses.  Oddly, doing this in match_forall_header, using 
gfc_get_parentheses, does not cure the problem, I am at a loss to 
explain why.


-- 
           Summary: ANY not accepted as mask in FORALL
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dominiq at lps dot ens dot fr
GCC target triplet: powerpc-apple-darwin7


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


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

end of thread, other threads:[~2007-02-28 20:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-07  0:46 [Bug fortran/30400] New: ANY not accepted as mask in FORALL dominiq at lps dot ens dot fr
2007-01-07  6:40 ` [Bug fortran/30400] " pault at gcc dot gnu dot org
2007-01-17  1:37 ` kargl at gcc dot gnu dot org
2007-02-18 19:52 ` pault at gcc dot gnu dot org
2007-02-24 15:10 ` [Bug fortran/30400] [4.2 and 4.1 only] " sayle at gcc dot gnu dot org
2007-02-25 21:15 ` sayle at gcc dot gnu dot org
2007-02-28 20:52 ` [Bug fortran/30400] " burnus 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).