+2005-07-11 Daniel Berlin <dberlin@dberlin.org>
+
+ * print-tree.c (print_node): Use DECL_ARGUMENT_FLD.
+ * tree.h (DECL_ARGUMENT_FLD): New macro.
+
+2005-07-11 Daniel Berlin <dberlin@dberlin.org>
+
+ Fix PR tree-optimization/22404
+
+ * tree-ssa-structalias.c (create_variable_info_for): Use
+ correct offset.
+
2005-07-11 Bernd Schmidt <bernd.schmidt@analog.com>
* config/bfin/bfin.md (cmpsi, compare_eq, compare_ne, compare_lt,
}
if (CODE_CONTAINS_STRUCT (code, TS_DECL_NON_COMMON))
{
- print_node (file, "arguments", DECL_ARGUMENTS (node), indent + 4);
+ print_node (file, "arguments", DECL_ARGUMENT_FLD (node), indent + 4);
print_node (file, "result", DECL_RESULT_FLD (node), indent + 4);
}
print_node_brief (file, "initial", DECL_INITIAL (node), indent + 4);
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+/* We were not getting the offset of a in B and a in C::B correct,
+ causing an abort. */
+struct A { A(); };
+
+struct B : A
+{
+ A a;
+};
+
+struct C : B { };
+
+C c;
field = fo->field;
vi->size = TREE_INT_CST_LOW (DECL_SIZE (field));
+ vi->offset = fo->offset;
for (i = 1; VEC_iterate (fieldoff_s, fieldstack, i, fo); i++)
{
varinfo_t newvi;
VAR_DECL and PARM_DECL reserve the arguments slot for language-specific
uses. */
#define DECL_ARGUMENTS(NODE) (FUNCTION_DECL_CHECK (NODE)->decl_non_common.arguments)
+#define DECL_ARGUMENT_FLD(NODE) (DECL_NON_COMMON_CHECK (NODE)->decl_non_common.arguments)
/* FUNCTION_DECL inherits from DECL_NON_COMMON because of the use of the
arguments/result/saved_tree fields by front ends. It was either inherit