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/29916] New: Dimension of a function result as host association does not work


The following valid code by Marco Restelli, 
http://gcc.gnu.org/ml/fortran/2006-11/msg00520.html
fails to compile with current gfortran 4.3:

host.f90:8.20:
 real :: internal_f(n)
                   1
Error: Variable 'n' cannot appear in the expression at (1)

This program compiles with NAG f95, ifort, g95, sunf95 and Lahey.

----------------------------
program test_internal
implicit none
integer :: n
n = 4
contains
function internal_f()
 real :: internal_f(n)
 internal_f = 2
end function internal_f
end program test_internal
----------------------------


-- 
           Summary: Dimension of a function result as host association does
                    not work
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org
GCC target triplet: x86_64-unknown-linux-gnu


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


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