aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2012-04-19 13:29:29 +0000
committerMichael Matz <matz@gcc.gnu.org>2012-04-19 13:29:29 +0000
commit314b662a3a636250eda24be515fb34c34140fb6a (patch)
tree8f69ea3822d53cbb5ee137c295bc3fb2dec89d98 /gcc/tree.h
parent7c98ec605d9c9d2bbb6d431016ebe74a73f0a522 (diff)
downloadgcc-314b662a3a636250eda24be515fb34c34140fb6a.zip
gcc-314b662a3a636250eda24be515fb34c34140fb6a.tar.gz
gcc-314b662a3a636250eda24be515fb34c34140fb6a.tar.bz2
re PR c/52977 (internal compiler error: Segmentation fault with `-x c-header' or `-x cxx-header' option)
PR middle-end/52977 * tree.h (VECTOR_CST_NELTS): Use part number of types again. (struct tree_vector): Adjust GTY length. * tree.c (make_vector_stat): Don't set VECTOR_CST_NELTS. * gengtype.c (struct walk_type_data): Add in_record_p and loopcounter members. (walk_type, <TYPE_POINTER, TYPE_ARRAY>): Handle case where our caller emitted the length calulation already. (walk_type, <TYPE_UNION, TYPE_STRUCT>): Emit length calculations From-SVN: r186593
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 6bfc29e..e719be2 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1534,14 +1534,13 @@ struct GTY(()) tree_complex {
};
/* In a VECTOR_CST node. */
-#define VECTOR_CST_NELTS(NODE) (VECTOR_CST_CHECK (NODE)->vector.length)
+#define VECTOR_CST_NELTS(NODE) (TYPE_VECTOR_SUBPARTS (TREE_TYPE (NODE)))
#define VECTOR_CST_ELTS(NODE) (VECTOR_CST_CHECK (NODE)->vector.elts)
#define VECTOR_CST_ELT(NODE,IDX) (VECTOR_CST_CHECK (NODE)->vector.elts[IDX])
struct GTY(()) tree_vector {
struct tree_typed typed;
- unsigned length;
- tree GTY ((length ("%h.length"))) elts[1];
+ tree GTY ((length ("TYPE_VECTOR_SUBPARTS (TREE_TYPE ((tree)&%h))"))) elts[1];
};
#include "symtab.h"