This is a clone of bug 41478, because this part is a regression (incidentally, introduced by me).
The problem was analyzed by Janus: not checking for the presence of vector when trying to access vector->data. -- Summary: [4.4/4.5 Regression] derived type segfault with pack and unpack Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tkoenig at gcc dot gnu dot org BugsThisDependsOn: 41478 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42268