http://gcc.gnu.org/onlinedocs/gfortran/COUNT.html

"COUNT(MASK [, DIM [, KIND]]) counts the number of .TRUE. elements of MASK
along the dimension of DIM. If DIM is omitted it is taken to be 1. DIM is a
scalar of type INTEGER in the range of 1 /leq DIM /leq n) where n is the rank
of MASK."

The description for omitted DIM is wrong. The standard has:
   "The result of COUNT (MASK) has a value equal to the number of true elements
of MASK or has the value zero if MASK has size zero."

That is not the same as defaulting to DIM=1.

Additionally, the
  "COUNT(MASK [, DIM [, KIND]])"
is wrong: One is allowed to specify KIND even if DIM is not present.


-- 
           Summary: Documentation: Description for COUNT is wrong
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: documentation
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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

Reply via email to