dwarf2out.c (loc_descriptor_from_tree): Return 0 for language-specific tree codes.
authorRichard Henderson <rth@redhat.com>
Thu, 5 Jun 2003 18:08:12 +0000 (11:08 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 5 Jun 2003 18:08:12 +0000 (11:08 -0700)
        * dwarf2out.c (loc_descriptor_from_tree): Return 0 for
        language-specific tree codes.

        * gcc.dg/debug/20030605-1.c: New.

From-SVN: r67505

gcc/ChangeLog
gcc/dwarf2out.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/debug/20030605-1.c [new file with mode: 0644]

index be404bf33d346b4ef540916a3d438be57e36c689..a332e9cb5f31ed1ca77f6dccab8a20d2fb4878fe 100644 (file)
@@ -1,3 +1,8 @@
+2003-05-06  Richard Henderson  <rth@redhat.com>
+
+       * dwarf2out.c (loc_descriptor_from_tree): Return 0 for 
+       language-specific tree codes.
+
 2003-06-05  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
        PR middle-end/9986
index e64932941acac5d4f036b77a6495ac434ad8d09b..dd0ee35b3cab872e800a8358c6c0c7ff34efbf8a 100644 (file)
@@ -9033,6 +9033,14 @@ loc_descriptor_from_tree (loc, addressp)
       break;
 
     default:
+      /* Leave front-end specific codes as simply unknown.  This comes
+        up, for instance, with the C STMT_EXPR.  */
+      if ((unsigned int) TREE_CODE (loc)
+          >= (unsigned int) LAST_AND_UNUSED_TREE_CODE)
+       return 0;
+
+      /* Otherwise this is a generic code; we should just lists all of
+        these explicitly.  Aborting means we forgot one.  */
       abort ();
     }
 
index 9781d57008f28ca543337c632f940bf39c5b61d3..ca874aaa71536ff35d372b79aaff19dc1f9a4bdf 100644 (file)
@@ -1,3 +1,7 @@
+2003-06-05  Richard Henderson  <rth@redhat.com>
+
+       * gcc.dg/debug/20030605-1.c: New.
+
 2003-06-04  Mark Mitchell  <mark@codesourcery.com>
 
        * README.QMTEST: Update.
diff --git a/gcc/testsuite/gcc.dg/debug/20030605-1.c b/gcc/testsuite/gcc.dg/debug/20030605-1.c
new file mode 100644 (file)
index 0000000..548faaf
--- /dev/null
@@ -0,0 +1,7 @@
+/* Verify we don't ICE on statement-expressions.  */
+/* { dg-do compile } */
+
+void foo(void)
+{
+  char buf[({ 4; })];
+}