tree.c (bot_manip): Set DECL_CONTEXT for newly created VAR_DECLs.
* tree.c (bot_manip): Set DECL_CONTEXT for newly created VAR_DECLs. From-SVN: r31498
This commit is contained in:
parent
1455913a0b
commit
301e21af2c
@ -1,3 +1,8 @@
|
||||
2000-01-19 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* tree.c (bot_manip): Set DECL_CONTEXT for newly created
|
||||
VAR_DECLs.
|
||||
|
||||
2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
|
||||
|
||||
* cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
|
||||
|
@ -1560,9 +1560,13 @@ bot_manip (tp, walk_subtrees, data)
|
||||
}
|
||||
else
|
||||
{
|
||||
tree var;
|
||||
|
||||
u = copy_node (t);
|
||||
TREE_OPERAND (u, 0) = build (VAR_DECL, TREE_TYPE (t));
|
||||
layout_decl (TREE_OPERAND (u, 0), 0);
|
||||
var = build (VAR_DECL, TREE_TYPE (t));
|
||||
DECL_CONTEXT (var) = current_function_decl;
|
||||
layout_decl (var, 0);
|
||||
TREE_OPERAND (u, 0) = var;
|
||||
}
|
||||
|
||||
/* Map the old variable to the new one. */
|
||||
|
19
gcc/testsuite/g++.old-deja/g++.other/inline6.C
Normal file
19
gcc/testsuite/g++.old-deja/g++.other/inline6.C
Normal file
@ -0,0 +1,19 @@
|
||||
// Build don't link:
|
||||
// Special g++ Options: -O2
|
||||
// Origin: Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
struct S
|
||||
{
|
||||
};
|
||||
|
||||
void f (S s = S ());
|
||||
|
||||
inline void g ()
|
||||
{
|
||||
f ();
|
||||
}
|
||||
|
||||
void h ()
|
||||
{
|
||||
g ();
|
||||
}
|
Loading…
Reference in New Issue
Block a user