Reported at http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/bf908dba87ce677a
Valgrind shows: ==10280== Invalid read of size 8 ==10280== at 0x4B67E2: gfc_trans_pointer_assignment (trans-expr.c:4076) ==10280== by 0x4956AF: gfc_trans_code (trans.c:1111) ==10280== by 0x4AD5FB: gfc_generate_function_code (trans-decl.c:3887) trans-expr.c is: 4066 if (expr1->symtree->n.sym->attr.subref_array_pointer) 4067 { 4068 decl = expr1->symtree->n.sym->backend_decl; 4069 gfc_init_se (&rse, NULL); 4070 rse.descriptor_only = 1; 4071 gfc_conv_expr (&rse, expr2); 4072 tmp = gfc_get_element_type (TREE_TYPE (rse.expr)); 4073 tmp = fold_convert (gfc_array_index_type, size_in_bytes (tmp)); 4074 if (!INTEGER_CST_P (tmp)) 4075 gfc_add_block_to_block (&lse.post, &rse.pre); 4076 gfc_add_modify (&lse.post, GFC_DECL_SPAN(decl), tmp); 4077 } module test implicit none !=================================================== type b integer :: j end type b !=================================================== type a type(b), dimension(4) :: i end type a !=================================================== contains !=================================================== subroutine test_sub(sorb,ipn) type(a), intent(in), target :: sorb integer, dimension(:), pointer :: ipn ipn=>sorb%i%j end subroutine test_sub !=================================================== end module test -- Summary: [4.3/4.4 Regression] ICE on pointer assignment of nested derived-type component Product: gcc Version: 4.4.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org OtherBugsDependingO 32834 nThis: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38471