genextract.c (print_path): Handle zero-length path as a special case.
authorRichard Earnshaw <rearnsha@arm.com>
Fri, 22 May 1998 03:44:58 +0000 (03:44 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Fri, 22 May 1998 03:44:58 +0000 (03:44 +0000)
From-SVN: r19947

gcc/ChangeLog
gcc/genextract.c

index d37a2152a6d8f9bc5d186de5cf32eb4630880974..1566492fac49d2722a23c887c867abc956c396aa 100644 (file)
@@ -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  <hp@axis.se>
 
        * cplus-dem.c (MBUF_SIZE): Bumped from 512 to 32767.
index 32c991682d21da000ab0503f31b735259aa8eb60..295243d2010ea3b5131759ce081492bebc6790eb 100644 (file)
@@ -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.  */