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/44960] New: non-array used as an array, identified as an external function


Spin-off from PR43179:

type t
  integer :: a
end type t
type(t) :: foo
! external :: foo          ! "Syntax error in PRINT"
print *, foo(1)%a
end

foo is used as an array although no declared as one; gfortran takes it as an
external function, although one can not access components of returned types
directly from the function call as it would be possible in C. The latter is
picked up if foo is confirmed as EXTERNAL function.

Expected: either error-out on component access on function return value or
deduce that it can not be function and must be an array - and error out as it
is not declared as one.


-- 
           Summary: non-array used as an array, identified as an external
                    function
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dfranke at gcc dot gnu dot org


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


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