The following code results in a gimplication error: type t1 integer :: comp end type
type(t1), target :: a class(t1) :: x pointer :: x a%comp = 3 x => a print *,x%comp end The problem here is that 'encapsulate_class_symbol' is called too early (i.e. before the symbol has acquired the pointer attribute). Solution: encapsulate_class_symbol must be called at resolution stage. -- Summary: [OOP] gimplification error on valid code Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: janus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41629