summaryrefslogtreecommitdiff
path: root/gcc/genextract.c
diff options
context:
space:
mode:
authorrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>1998-05-22 03:44:58 +0000
committerrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>1998-05-22 03:44:58 +0000
commitc37c80b7e9ca341cc9431ff39e866e6e27bcce1e (patch)
tree08979c7b1a5d0d35604acd5987ebbd391ccbffca /gcc/genextract.c
parent063e90eadd372332f5dd6380cc46844fafcfac6e (diff)
downloadgcc-c37c80b7e9ca341cc9431ff39e866e6e27bcce1e.tar.gz
genextract.c (print_path): Handle zero-length path as a special case.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19947 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/genextract.c')
-rw-r--r--gcc/genextract.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/genextract.c b/gcc/genextract.c
index 32c991682d2..295243d2010 100644
--- a/gcc/genextract.c
+++ b/gcc/genextract.c
@@ -318,6 +318,14 @@ print_path (path)
register int len = strlen (path);
register int i;
+ if (len == 0)
+ {
+ /* Don't emit "pat", since we may try to take the address of it,
+ which isn't what is intended. */
+ printf("PATTERN (insn)");
+ return;
+ }
+
/* We first write out the operations (XEXP or XVECEXP) in reverse
order, then write "insn", then the indices in forward order. */