]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR c++/6994 (ICE in find_function_data)
authorZack Weinberg <zack@codesourcery.com>
Fri, 25 Oct 2002 22:11:19 +0000 (22:11 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Fri, 25 Oct 2002 22:11:19 +0000 (22:11 +0000)
commit68a3e7e1aa16b596e6e0bb924d003cf79d68f308
tree3a20a1bf9dd0da142ba21584661cd0b03360a306
parent28f97059a610c0e4c9906238a6570205c3c8611b
re PR c++/6994 (ICE in find_function_data)

PR middle-end/6994
* c-objc-common.c (inline_forbidden_p): Can not inline
functions containing structures or unions containing VLAs.
* tree-inline.c (walk_tree): For all class 't' nodes, walk
TYPE_SIZE and TYPE_SIZE_UNIT. #undef WALK_SUBTREE_TAIL at end.
(copy_tree_r): Copy types if they are variably modified.

* hooks.c (hook_tree_bool_false): New.
* hooks.h: Prototype it.
* langhooks.h (struct lang_hooks_for_tree_inlining): Add
var_mod_type_p.
* langhooks-def.h: Default for tree_inlining.var_mod_type_p is
hook_tree_bool_false.

* tree.c (variably_modified_type_p): Moved here from
cp/tree.c.  Use lang_hooks.tree_inlining.var_mod_type_p for
language-specific cases.  Due to this, must weaken some 'if
and only if' checks to merely 'if'.
* tree.h: Prototype variably_modified_type_p.

cp:
* cp-lang.c (cp_var_mod_type_p): New: C++ hook for
variably_modified_type_p.
* cp-tree.h: Remove prototype of variably_modified_type_p.
* tree.c (variably_modified_type_p): Remove; now implemented
in language-independent code.

PR c++/7266
* decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
SCOPE_REF is not null before dereferencing it.

testsuite:
* g++.dg/ext/vla1.C, gcc.dg/vla-2.c,
g++.dg/template/typename3.C: New tests.

From-SVN: r58542
15 files changed:
gcc/ChangeLog
gcc/c-objc-common.c
gcc/cp/ChangeLog
gcc/cp/cp-lang.c
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/tree.c
gcc/hooks.c
gcc/hooks.h
gcc/langhooks-def.h
gcc/langhooks.h
gcc/testsuite/ChangeLog
gcc/tree-inline.c
gcc/tree.c
gcc/tree.h