aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-01-04 07:34:51 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1994-01-04 07:34:51 -0500
commit6a22e3a73199601882483cccb71ddca83b512df1 (patch)
treee5b758f024fb1ee5e2ff57c4aeb240de6b74828b
parentdadae8179e3db0e8638a5b61923e959d800d0eed (diff)
downloadgcc-6a22e3a73199601882483cccb71ddca83b512df1.zip
gcc-6a22e3a73199601882483cccb71ddca83b512df1.tar.gz
gcc-6a22e3a73199601882483cccb71ddca83b512df1.tar.bz2
(substitute_expr): Don't abort for RTL_EXPR and SAVE_EXPR; just do
nothing. From-SVN: r6357
-rw-r--r--gcc/tree.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 8324ba1..2e4bb12 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -1,5 +1,5 @@
/* Language-independent node constructors for parse phase of GNU compiler.
- Copyright (C) 1987, 1988, 1992, 1993 Free Software Foundation, Inc.
+ Copyright (C) 1987, 1988, 1992, 1993, 1994 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -2017,7 +2017,11 @@ substitute_in_expr (exp, f, r)
f, r)));
case 2:
- if (code == RTL_EXPR || code == CONSTRUCTOR)
+ /* An RTL_EXPR cannot contain a PLACEHOLDER_EXPR; a CONSTRUCTOR
+ could, but we don't support it. */
+ if (code == RTL_EXPR)
+ return exp;
+ else if (code == CONSTRUCTOR)
abort ();
return fold (build (code, TREE_TYPE (exp),
@@ -2026,6 +2030,11 @@ substitute_in_expr (exp, f, r)
f, r)));
case 3:
+ /* It cannot be that anything inside a SAVE_EXPR contains a
+ PLACEHOLDER_EXPR. */
+ if (code == SAVE_EXPR)
+ return exp;
+
if (code != COND_EXPR)
abort ();