aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1997-12-06 17:31:01 -0700
committerJeff Law <law@gcc.gnu.org>1997-12-06 17:31:01 -0700
commit956d69504d77d301015532d2f0564213f0efc706 (patch)
treeec80f8d1e46852ac1ba45aecdcda7201c302ac6f /gcc/tree.c
parent27b6b158c29b45fd80c2f104d5da1f4bc818d7ab (diff)
downloadgcc-956d69504d77d301015532d2f0564213f0efc706.zip
gcc-956d69504d77d301015532d2f0564213f0efc706.tar.gz
gcc-956d69504d77d301015532d2f0564213f0efc706.tar.bz2
Merge from gcc-2.8
From-SVN: r16987
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index ecd6961..5db36c2 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -55,6 +55,10 @@ Boston, MA 02111-1307, USA. */
extern void free PROTO((void *));
#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
@@ -2605,10 +2609,10 @@ substitute_in_expr (exp, f, r)
op0 = (TREE_CHAIN (exp) == 0
? 0 : substitute_in_expr (TREE_CHAIN (exp), f, r));
op1 = substitute_in_expr (TREE_VALUE (exp), f, r);
- if (op0 == TREE_CHAIN (exp) || op1 == TREE_VALUE (exp))
+ if (op0 == TREE_CHAIN (exp) && op1 == TREE_VALUE (exp))
return exp;
- return tree_cons (TREE_PURPOSE (exp), op0, op1);
+ return tree_cons (TREE_PURPOSE (exp), op1, op0);
}
abort ();
@@ -4361,7 +4365,7 @@ get_unwidened (op, for_type)
if (TREE_CODE (op) == COMPONENT_REF
/* Since type_for_size always gives an integer type. */
&& TREE_CODE (type) != REAL_TYPE
- /* Don't crash if field not layed out yet. */
+ /* Don't crash if field not laid out yet. */
&& DECL_SIZE (TREE_OPERAND (op, 1)) != 0)
{
unsigned innerprec = TREE_INT_CST_LOW (DECL_SIZE (TREE_OPERAND (op, 1)));