The following is non-standard and the compiler should probably generate a
warning/error with '-pedantic -std=f95', but does not do so with
gcc version 4.3.0 20080103 (experimental) [trunk revision 131300] (GCC)

CONTAINS
SUBROUTINE S1(a)
 real, dimension(:) :: a
 call s2(a(1))
END SUBROUTINE S1
SUBROUTINE S2(a)
 real, dimension(*) :: a
END SUBROUTINE S2
END


-- 
           Summary: Cannot pass scalar to array argument 'a'
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jv244 at cam dot ac dot uk


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

Reply via email to