This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/16674] New: Invalid code in specification expression accepted


In bug #15963 I reported that gfortran was inconsistent
in accepting arguments for the function 'count' when it
is used in a specification expression. This has been
fixed. That piece of code was the following:



subroutine x(a)

implicit none
character(8), intent(in)  :: a(10)
character(8)              :: b(count(a < 'D'))


write(6,*) size(b)

end subroutine x



However, I am currently testing the Absoft compiler and that
rejects the code anyway saying that 'count' is not allowed
to be used in a specification expression. After some digging
in Metcalf and Reid it appears they are right. 'count' is a
so-called 'transformational function', and those are not to
be used in specification expressions. If someone more 
knowledgable about the standard can confirm this, then this
is a bug in gfortran (and all other compilers I know because
they accept it as well).

-- 
           Summary: Invalid code in specification expression accepted
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: Mart dot Rentmeester at nn-online dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]