http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58085
Bug ID: 58085 Summary: Wrong indexing of an array in ASSOCIATE Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: vladimir.fuka at gmail dot com Program: real c(3,3) associate (x=>shape(c)) print *,lbound(x) print *,ubound(x) print *,x(1),x(2) end associate end Expected result: 1 2 3 3 Actual result: >gfortran-4.7 indresult.f90 > ./a.out 1 2 3 990059265 >gfortran-4.8 indresult.f90 > ./a.out 1 2 3 0 ,but: print *,x(0),x(1) ! bound checks off --> 3 3