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

* [Bug fortran/30400] ANY not accepted as mask in FORALL
  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 ` pault at gcc dot gnu dot org
  2007-01-17  1:37 ` kargl at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-01-07  6:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pault at gcc dot gnu dot org  2007-01-07 06:40 -------
confirmed


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|0000-00-00 00:00:00         |2007-01-07 06:40:22
               date|                            |


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


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

* [Bug fortran/30400] ANY not accepted as mask in FORALL
  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
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: kargl at gcc dot gnu dot org @ 2007-01-17  1:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from kargl at gcc dot gnu dot org  2007-01-17 01:37 -------
*** Bug 30487 has been marked as a duplicate of this bug. ***


-- 

kargl at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |icksa1 at gmail dot com


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


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

* [Bug fortran/30400] ANY not accepted as mask in FORALL
  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
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-02-18 19:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pault at gcc dot gnu dot org  2007-02-18 19:52 -------
Subject: Bug 30400

Author: pault
Date: Sun Feb 18 19:52:16 2007
New Revision: 122102

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=122102
Log:
2007-02-18  Roger Sayle  <roger@eyesopen.com>
            Paul Thomas <pault@gcc.gnu.org>

        PR fortran/30400
        * match.c (match_forall_iterator): Use gfc_match_expr instead
        of gfc_match_variable to match the iterator variable.  Return
        MATCH_NO if not a variable.  Remove the reset of the symbol's
        flavor in cleanup.

2007-02-18  Roger Sayle  <roger@eyesopen.com>

        * gfortran.dg/forall_10.f90: New test case.

Added:
    trunk/gcc/testsuite/gfortran.dg/forall_10.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/match.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/30400] [4.2 and 4.1 only] ANY not accepted as mask in FORALL
  2007-01-07  0:46 [Bug fortran/30400] New: ANY not accepted as mask in FORALL dominiq at lps dot ens dot fr
                   ` (2 preceding siblings ...)
  2007-02-18 19:52 ` pault at gcc dot gnu dot org
@ 2007-02-24 15:10 ` 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
  5 siblings, 0 replies; 7+ messages in thread
From: sayle at gcc dot gnu dot org @ 2007-02-24 15:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from sayle at gcc dot gnu dot org  2007-02-24 15:10 -------
Subject: Bug 30400

Author: sayle
Date: Sat Feb 24 15:09:50 2007
New Revision: 122289

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=122289
Log:
2007-02-24  Roger Sayle  <roger@eyesopen.com>
            Paul Thomas <pault@gcc.gnu.org>

        PR fortran/30400
        * match.c (match_forall_iterator): Use gfc_match_expr instead
        of gfc_match_variable to match the iterator variable.  Return
        MATCH_NO if not a variable.  Remove the reset of the symbol's
        flavor in cleanup.

        * gfortran.dg/forall_10.f90: New test case.


Added:
    branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/forall_10.f90
Modified:
    branches/gcc-4_2-branch/gcc/fortran/ChangeLog
    branches/gcc-4_2-branch/gcc/fortran/match.c
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/30400] [4.2 and 4.1 only] ANY not accepted as mask in FORALL
  2007-01-07  0:46 [Bug fortran/30400] New: ANY not accepted as mask in FORALL dominiq at lps dot ens dot fr
                   ` (3 preceding siblings ...)
  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
  5 siblings, 0 replies; 7+ messages in thread
From: sayle at gcc dot gnu dot org @ 2007-02-25 21:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from sayle at gcc dot gnu dot org  2007-02-25 21:15 -------
Subject: Bug 30400

Author: sayle
Date: Sun Feb 25 21:14:49 2007
New Revision: 122322

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=122322
Log:
2007-02-25  Roger Sayle  <roger@eyesopen.com>
            Paul Thomas <pault@gcc.gnu.org>

        PR fortran/30400
        * match.c (match_forall_iterator): Use gfc_match_expr instead
        of gfc_match_variable to match the iterator variable.  Return
        MATCH_NO if not a variable.  Remove the reset of the symbol's
        flavor in cleanup.

        * gfortran.dg/forall_10.f90: New test case.


Added:
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/forall_10.f90
Modified:
    branches/gcc-4_1-branch/gcc/fortran/ChangeLog
    branches/gcc-4_1-branch/gcc/fortran/match.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/30400] ANY not accepted as mask in FORALL
  2007-01-07  0:46 [Bug fortran/30400] New: ANY not accepted as mask in FORALL dominiq at lps dot ens dot fr
                   ` (4 preceding siblings ...)
  2007-02-25 21:15 ` sayle at gcc dot gnu dot org
@ 2007-02-28 20:52 ` burnus at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-02-28 20:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from burnus at gcc dot gnu dot org  2007-02-28 20:52 -------
FIXED as commited to 4.1, 4.2 and 4.3/trunk. I think the fix is complete. If
not, please reopen.


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
            Summary|[4.2 and 4.1 only] ANY not  |ANY not accepted as mask in
                   |accepted as mask in FORALL  |FORALL


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).