From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28887 invoked by alias); 7 Jan 2007 00:46:32 -0000 Received: (qmail 28869 invoked by uid 48); 7 Jan 2007 00:46:22 -0000 Date: Sun, 07 Jan 2007 00:46:00 -0000 Subject: [Bug fortran/30400] New: ANY not accepted as mask in FORALL X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dominiq at lps dot ens dot fr" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-01/txt/msg00447.txt.bz2 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