summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2003-06-05 18:08:12 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2003-06-05 18:08:12 +0000
commit76d1c62dbe2dbde567f8fa950bfddc5ecd8cd87d (patch)
tree89fe51052af3f94cf74cc07ba5c6aef4be3641c2
parenta3b0e823572c79774c37e5421857904544dc98c7 (diff)
downloadgcc-76d1c62dbe2dbde567f8fa950bfddc5ecd8cd87d.tar.gz
* dwarf2out.c (loc_descriptor_from_tree): Return 0 for
language-specific tree codes. * gcc.dg/debug/20030605-1.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67505 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/dwarf2out.c8
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/debug/20030605-1.c7
4 files changed, 24 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index be404bf33d3..a332e9cb5f3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index e64932941ac..dd0ee35b3ca 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -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 ();
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 9781d57008f..ca874aaa715 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 00000000000..548faaf5a20
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/20030605-1.c
@@ -0,0 +1,7 @@
+/* Verify we don't ICE on statement-expressions. */
+/* { dg-do compile } */
+
+void foo(void)
+{
+ char buf[({ 4; })];
+}