tree.c (make_node): Don't set TREE_TYPE on 's' class nodes.
* tree.c (make_node): Don't set TREE_TYPE on 's' class nodes. (build1): Always set TREE_SIDE_EFFECTS on 's' class nodes. From-SVN: r60237
This commit is contained in:
parent
efc7052de7
commit
9ec227134b
@ -1,5 +1,8 @@
|
||||
2002-12-17 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* tree.c (make_node): Don't set TREE_TYPE on 's' class nodes.
|
||||
(build1): Always set TREE_SIDE_EFFECTS on 's' class nodes.
|
||||
|
||||
* gcc.c (do_spec_1) ['W']: End any pending argument from the braces.
|
||||
|
||||
* calls.c (expand_call): Don't try to be clever about expanding
|
||||
|
35
gcc/tree.c
35
gcc/tree.c
@ -297,7 +297,6 @@ make_node (code)
|
||||
{
|
||||
case 's':
|
||||
TREE_SIDE_EFFECTS (t) = 1;
|
||||
TREE_TYPE (t) = void_type_node;
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
@ -2269,17 +2268,28 @@ build1 (code, type, node)
|
||||
tree type;
|
||||
tree node;
|
||||
{
|
||||
int length;
|
||||
int length = sizeof (struct tree_exp);
|
||||
#ifdef GATHER_STATISTICS
|
||||
tree_node_kind kind;
|
||||
#endif
|
||||
tree t;
|
||||
|
||||
#ifdef GATHER_STATISTICS
|
||||
if (TREE_CODE_CLASS (code) == 'r')
|
||||
kind = r_kind;
|
||||
else
|
||||
kind = e_kind;
|
||||
switch (TREE_CODE_CLASS (code))
|
||||
{
|
||||
case 's': /* an expression with side effects */
|
||||
kind = s_kind;
|
||||
break;
|
||||
case 'r': /* a reference */
|
||||
kind = r_kind;
|
||||
break;
|
||||
default:
|
||||
kind = e_kind;
|
||||
break;
|
||||
}
|
||||
|
||||
tree_node_counts[(int) kind]++;
|
||||
tree_node_sizes[(int) kind] += length;
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_CHECKING
|
||||
@ -2289,17 +2299,10 @@ build1 (code, type, node)
|
||||
abort ();
|
||||
#endif /* ENABLE_CHECKING */
|
||||
|
||||
length = sizeof (struct tree_exp);
|
||||
|
||||
t = ggc_alloc_tree (length);
|
||||
|
||||
memset ((PTR) t, 0, sizeof (struct tree_common));
|
||||
|
||||
#ifdef GATHER_STATISTICS
|
||||
tree_node_counts[(int) kind]++;
|
||||
tree_node_sizes[(int) kind] += length;
|
||||
#endif
|
||||
|
||||
TREE_SET_CODE (t, code);
|
||||
|
||||
TREE_TYPE (t) = type;
|
||||
@ -2311,7 +2314,11 @@ build1 (code, type, node)
|
||||
TREE_READONLY (t) = TREE_READONLY (node);
|
||||
}
|
||||
|
||||
switch (code)
|
||||
if (TREE_CODE_CLASS (code) == 's')
|
||||
{
|
||||
TREE_SIDE_EFFECTS (t) = 1;
|
||||
}
|
||||
else switch (code)
|
||||
{
|
||||
case INIT_EXPR:
|
||||
case MODIFY_EXPR:
|
||||
|
Loading…
Reference in New Issue
Block a user