Commit 66212c2f by Richard Kenner

(make_node, case 'c'): For INTEGER_CST, use size of struct containing constant,…

(make_node, case 'c'): For INTEGER_CST, use size of struct containing constant, just like for reals.

(make_node, case 'c'): For INTEGER_CST, use size of struct containing
constant, just like for reals.  Also, clean up code to avoid confusing
fallthrough.

From-SVN: r2919
parent 0570c423
...@@ -844,13 +844,21 @@ make_node (code) ...@@ -844,13 +844,21 @@ make_node (code)
kind = c_kind; kind = c_kind;
#endif #endif
obstack = expression_obstack; obstack = expression_obstack;
/* We can't use tree_code_length for this, since the number of words
is machine-dependent due to varying alignment of `double'. */ /* We can't use tree_code_length for INTEGER_CST, since the number of
if (code == REAL_CST) words is machine-dependent due to varying length of HOST_WIDE_INT,
{ which might be wider than a pointer (e.g., long long). Similarly
length = sizeof (struct tree_real_cst); for REAL_CST, since the number of words is machine-dependent due
break; to varying size and alignment of `double'. */
}
if (code == INTEGER_CST)
length = sizeof (struct tree_int_cst);
else if (code == REAL_CST)
length = sizeof (struct tree_real_cst);
else
length = sizeof (struct tree_common)
+ tree_code_length[(int) code] * sizeof (char *);
break;
case 'x': /* something random, like an identifier. */ case 'x': /* something random, like an identifier. */
#ifdef GATHER_STATISTICS #ifdef GATHER_STATISTICS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment