[Bug c/52977] [4.8 Regression] internal compiler error: Segmentation fault with `-x c-header' or `-x cxx-header' option
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Apr 16 10:15:00 GMT 2012
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 :/
More information about the Gcc-bugs
mailing list