aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-08-27 03:01:20 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-08-27 03:01:20 +0000
commitc3da6f12b809fb040bc5090ed36a461db4e9c3ad (patch)
treeed62114fd145c4b72761431904346d71a0873936 /gcc
parentb2244e22a0cee5b617bc0619e5f8c2b11e14b2e1 (diff)
downloadgcc-c3da6f12b809fb040bc5090ed36a461db4e9c3ad.zip
gcc-c3da6f12b809fb040bc5090ed36a461db4e9c3ad.tar.gz
gcc-c3da6f12b809fb040bc5090ed36a461db4e9c3ad.tar.bz2
tree.c (copy_node): Improve documentation.
* tree.c (copy_node): Improve documentation. (cplus_unsave_expr_now): Don't return a value. From-SVN: r28911
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree.c11
2 files changed, 12 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 85b24a5..4596ac1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Thu Aug 26 18:11:20 1999 Mark Mitchell <mark@codesourcery.com>
+
+ * tree.c (array_type_nelts): Don't create RTL_EXPRs from
+ SAVE_EXPRs unless the SAVE_EXPRs have already been expanded.
+
Thu Aug 26 19:33:23 1999 Jim Wilson <wilson@cygnus.com>
* dwarf2out.c (DWARF2_ASM_LINE_DEBUG_INFO): Add default definition.
diff --git a/gcc/tree.c b/gcc/tree.c
index 6b5630d..dcc0ac7 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -1127,8 +1127,11 @@ make_node (code)
return t;
}
-/* Return a new node with the same contents as NODE
- except that its TREE_CHAIN is zero and it has a fresh uid. */
+/* Return a new node with the same contents as NODE except that its
+ TREE_CHAIN is zero and it has a fresh uid. Unlike make_node, this
+ function always performs the allocation on the CURRENT_OBSTACK;
+ it's up to the caller to pick the right obstack before calling this
+ function. */
tree
copy_node (node)
@@ -2244,7 +2247,7 @@ array_type_nelts (type)
if (! TREE_CONSTANT (min))
{
STRIP_NOPS (min);
- if (TREE_CODE (min) == SAVE_EXPR)
+ if (TREE_CODE (min) == SAVE_EXPR && SAVE_EXPR_RTL (min))
min = build (RTL_EXPR, TREE_TYPE (TYPE_MIN_VALUE (index_type)), 0,
SAVE_EXPR_RTL (min));
else
@@ -2254,7 +2257,7 @@ array_type_nelts (type)
if (! TREE_CONSTANT (max))
{
STRIP_NOPS (max);
- if (TREE_CODE (max) == SAVE_EXPR)
+ if (TREE_CODE (max) == SAVE_EXPR && SAVE_EXPR_RTL (max))
max = build (RTL_EXPR, TREE_TYPE (TYPE_MAX_VALUE (index_type)), 0,
SAVE_EXPR_RTL (max));
else