When compiled with -fcheck=bounds, the following test

 integer :: a(-4:1), b(0:4)
 b = 5
 i = 0
 a(i:1) = f(b)
contains
  function f(x)
    integer :: x(:),f(size(x))
    f = x
  end function
end

used to give the runtime error

At line 14 of file pr31538_db.f90
Fortran runtime error: Dimension 1 of array 'f' has extent 5 instead of 2

This is no longer the case after revision 161550.


-- 
           Summary: [4.6 Regression] Missed runtime error after revision
                    161550
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dominiq at lps dot ens dot fr


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

Reply via email to