http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52977
--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-04-16 10:15:35 UTC --- ugh... #0 0x00000000004d7255 in gt_pch_p_14lang_tree_node (this_obj=0x7ffff5bf64c0, x_p=0x7ffff5bf64c0, op=0x8b1a27 <relocate_ptrs>, cookie=0x7fffffffdb20) at ./gt-c-decl.h:1448 case TS_VECTOR: if ((void *)(x) == this_obj) op (&((*x).generic.vector.typed.type), cookie); { size_t i0; size_t l0 = (size_t)(TYPE_VECTOR_SUBPARTS (TREE_TYPE ((tree)&((*x).generic.vector)))); for (i0 = 0; i0 != l0; i0++) { if ((void *)(x) == this_obj) op (&((*x).generic.vector.elts[i0]), cookie); } } break; so we relocate TREE_TYPE before accessing it to find the number of elements. Other than trying to teach gengtype to compute all required lengths before changing pointers I only see the less efficient solution of repeating the element count in-line :/