This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c++/7266
- From: zack at gcc dot gnu dot org
- To: zack at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 25 Oct 2002 22:16:03 -0000
- Subject: c++/7266
- Reply-to: zack at gcc dot gnu dot org
The following reply was made to PR c++/7266; it has been noted by GNATS.
From: zack@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:
Subject: c++/7266
Date: 25 Oct 2002 22:11:20 -0000
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_2-branch
Changes by: zack@gcc.gnu.org 2002-10-25 15:11:19
Modified files:
gcc : ChangeLog c-objc-common.c hooks.c hooks.h
langhooks-def.h langhooks.h tree-inline.c
tree.c tree.h
gcc/cp : ChangeLog cp-lang.c cp-tree.h decl.c tree.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/ext: vla1.C
gcc/testsuite/g++.dg/template: typename3.C
gcc/testsuite/gcc.dg: vla-2.c
Log message:
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.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.13152.2.657.2.105&r2=1.13152.2.657.2.106
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-objc-common.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.3.2.2.4.1&r2=1.3.2.2.4.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/hooks.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.1.10.1&r2=1.1.10.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/hooks.h.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.1.10.1&r2=1.1.10.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/langhooks-def.h.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.8.10.2.2.1&r2=1.8.10.2.2.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/langhooks.h.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.15.8.2.2.1&r2=1.15.8.2.2.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-inline.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.15.2.3.4.1&r2=1.15.2.3.4.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.241.2.1.4.1&r2=1.241.2.1.4.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree.h.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.308.2.2.4.1&r2=1.308.2.2.4.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.2685.2.114.2.33&r2=1.2685.2.114.2.34
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-lang.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.9.10.1.2.2&r2=1.9.10.1.2.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.681.2.12.2.8&r2=1.681.2.12.2.9
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.866.2.36.2.8&r2=1.866.2.36.2.9
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/tree.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.268.2.7.2.2&r2=1.268.2.7.2.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.1672.2.166.2.39&r2=1.1672.2.166.2.40
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/vla1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/typename3.C.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/vla-2.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=NONE&r2=1.1.2.1