From 07704a9adb1f8e87d5c7d21661f7bd538077dd23 Mon Sep 17 00:00:00 2001 From: Richard Earnshaw Date: Fri, 22 May 1998 03:44:58 +0000 Subject: genextract.c (print_path): Handle zero-length path as a special case. From-SVN: r19947 --- gcc/ChangeLog | 5 +++++ gcc/genextract.c | 8 ++++++++ 2 files changed, 13 insertions(+) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d37a215..1566492 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Fri May 22 03:42:05 1998 Richard Earnshaw (rearnsha@arm.com) + + * genextract.c (print_path): Handle zero-length path as a special + case. + Fri May 22 01:38:07 1998 Hans-Peter Nilsson * cplus-dem.c (MBUF_SIZE): Bumped from 512 to 32767. diff --git a/gcc/genextract.c b/gcc/genextract.c index 32c9916..295243d 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. */ -- cgit v1.1