re PR tree-optimization/22404 (ICE in first_vi_for_offset)
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. From-SVN: r101894
This commit is contained in:
parent
ebde3ea873
commit
046a69e067
5 changed files with 30 additions and 1 deletions
|
@ -1,3 +1,15 @@
|
|||
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,
|
||||
|
|
|
@ -467,7 +467,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
|
|||
}
|
||||
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);
|
||||
|
|
15
gcc/testsuite/g++.dg/tree-ssa/pr22404.C
Normal file
15
gcc/testsuite/g++.dg/tree-ssa/pr22404.C
Normal file
|
@ -0,0 +1,15 @@
|
|||
/* { 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;
|
|
@ -3065,6 +3065,7 @@ create_variable_info_for (tree decl, const char *name)
|
|||
|
||||
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;
|
||||
|
|
|
@ -2631,6 +2631,7 @@ struct tree_decl_non_common GTY(())
|
|||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue