public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/16946] New: sum (array, mask) is not accepted
@ 2004-08-09 16:59 schnetter at aei dot mpg dot de
  2004-08-09 17:06 ` [Bug fortran/16946] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: schnetter at aei dot mpg dot de @ 2004-08-09 16:59 UTC (permalink / raw)
  To: gcc-bugs

It seems that gfortran does not accept the expression 
 
	sum (array, mask) 
 
The code 
 
program sum_mask 
  implicit none 
  logical :: equal(3) 
  integer :: itype 
  integer :: n 
  itype = sum((/(2**n, n=0, 2)/), equal) 
end program sum_mask 
 
is rejected with the error message 
 
$ ~/gcc/bin/gfortran -c sum_mask.f90  
 In file sum_mask.f90:6 
 
  itype = sum((/(2**n, n=0, 2)/), equal) 
                                1 
Error: Array index at (1) must be of INTEGER type 
 
 
 
According to my draft of Fortran 95, section 13.14.105, this should be legal.  
In my draft of Fortran 2k, section 13.5.12, this should also be legal.

-- 
           Summary: sum (array, mask) is not accepted
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: schnetter at aei dot mpg dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

end of thread, other threads:[~2004-08-19 22:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-09 16:59 [Bug fortran/16946] New: sum (array, mask) is not accepted schnetter at aei dot mpg dot de
2004-08-09 17:06 ` [Bug fortran/16946] " pinskia at gcc dot gnu dot org
2004-08-09 17:24 ` schnetter at aei dot mpg dot de
2004-08-09 19:04 ` pinskia at gcc dot gnu dot org
2004-08-10 15:51 ` pinskia at gcc dot gnu dot org
2004-08-19 15:31 ` cvs-commit at gcc dot gnu dot org
2004-08-19 15:34 ` tobi at gcc dot gnu dot org
2004-08-19 15:36 ` pinskia at gcc dot gnu dot org
2004-08-19 22:30 ` cvs-commit 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).