Hi, the following code used to throw an error with
GNU Fortran 95 (GCC) 4.1.2 20070115 (prerelease) (SUSE Linux) GNU Fortran (GCC) 4.2.1 (SUSE Linux) gfcbug78.f90:12.10: obs(l)% x = 0 ! gfortran misses this illegal assignment 1 Error: Can't assign to INTENT(IN) variable 'obs' at (1) but fails to do so with 4.3.x: GNU Fortran (GCC) 4.3.0 20080218 (experimental) [trunk revision 132388] GNU Fortran (GCC) 4.3.1 20080519 (prerelease) module gfcbug78 implicit none type t_obs real, pointer :: x(:) => NULL() end type t_obs contains subroutine set_obs (obs) type (t_obs), intent(in) :: obs(:) integer :: l do l = 1, size (obs) obs(l)% x = 0 ! gfortran misses this illegal assignment end do end subroutine set_obs end module gfcbug78 -- Summary: [4.3 regression] Missed error with assignment to INTENT(IN) argument Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: anlauf at gmx dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36271