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 be404bf..a332e9c 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 e649329..dd0ee35 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 9781d57..ca874aa 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; })];
+}