]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c/6809 (GCC 3.1 cc1 crashes if -fverbose-asm is specified)
authorJakub Jelinek <jakub@redhat.com>
Mon, 10 Jun 2002 21:51:07 +0000 (23:51 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 10 Jun 2002 21:51:07 +0000 (23:51 +0200)
PR c/6809
* print-rtl.c (print_mem_expr): Don't crash on unnamed fields.

* gcc.dg/20020530-1.c: New test.

From-SVN: r54465

gcc/ChangeLog
gcc/print-rtl.c
gcc/testsuite/ChangeLog

index 03d7b843dbc21961f42a588a7dbfa7262a9d8f1e..5924df9ecc9701cdccee7493fc6f4998a74b9aad 100644 (file)
@@ -1,3 +1,8 @@
+2002-06-10  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c/6809
+       * print-rtl.c (print_mem_expr): Don't crash on unnamed fields.
+
 2002-06-10  Jakub Jelinek  <jakub@redhat.com>
 
        * varasm.c (const_hash): Handle FDESC_EXPR like ADDR_EXPR.
index b819d143a340c88d89b7d916bfa97ec239d29369..a93a99b61a23d8a0f27022616f05867a69baa6e8 100644 (file)
@@ -88,8 +88,9 @@ print_mem_expr (outfile, expr)
         print_mem_expr (outfile, TREE_OPERAND (expr, 0));
       else
        fputs (" <variable>", outfile);
-      fprintf (outfile, ".%s",
-              IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (expr, 1))));
+      if (DECL_NAME (TREE_OPERAND (expr, 1)))
+       fprintf (outfile, ".%s",
+                IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (expr, 1))));
     }
   else if (DECL_NAME (expr))
     fprintf (outfile, " %s", IDENTIFIER_POINTER (DECL_NAME (expr)));
index 65fe5917ef089ba2ca73bf9b92a1cba507156c8c..df64e703bf88a56ca214b1ebfd7594527e209fc8 100644 (file)
@@ -4,6 +4,8 @@
 
        * g++.dg/opt/vt1.C: New test.
 
+       * gcc.dg/20020530-1.c: New test.
+
 2002-05-29  Hans-Peter Nilsson  <hp@axis.com>
 
        * gcc.c-torture/execute/20020529-1.c: New test.