From: James A. Morrison Date: Sat, 6 Aug 2005 05:18:09 +0000 (+0000) Subject: re PR debug/22514 (ICE in force_decl_die with invalid code after error) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=099f36ab8c55844ae47def2f3cacaef7d006d441;p=gcc.git re PR debug/22514 (ICE in force_decl_die with invalid code after error) 2005-08-05 James A. Morrison PR c++/22514 * name-lookup.c (cp_emit_debug_info_for_using): Do nothing if sorrycount or errorcount are nonzero. From-SVN: r102799 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 6c4108faf90..574918b60bf 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2005-08-05 James A. Morrison + + PR c++/22514 + * name-lookup.c (cp_emit_debug_info_for_using): Do nothing if + sorrycount or errorcount are nonzero. + 2005-08-05 Mark Mitchell * name-lookup.c (pushtag): Remove accidental commit from: diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 70ecfadcbae..a03b648398a 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -4949,6 +4949,10 @@ pop_everything (void) void cp_emit_debug_info_for_using (tree t, tree context) { + /* Don't try to emit any debug information if we have errors. */ + if (sorrycount || errorcount) + return; + /* Ignore this FUNCTION_DECL if it refers to a builtin declaration of a builtin function. */ if (TREE_CODE (t) == FUNCTION_DECL diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8e512b27260..d0fb7f368bb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2005-08-05 James A. Morrison + + * g++.dg/parse/pr22514.C: New test. + 2005-08-05 J"orn Rennecke * gcc.dg/intmax_t-1.c: Extend dg-error to cover sh*-*-elf targets. diff --git a/gcc/testsuite/g++.dg/parse/pr22514.C b/gcc/testsuite/g++.dg/parse/pr22514.C new file mode 100644 index 00000000000..23dc9b2b061 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/pr22514.C @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +namespace s +{ + template struct _List_base + { + int _M_impl; + }; + template struct list : _List_base + { + using _List_base::_M_impl; + } +} /* { dg-error "expected unqualified-id before '\}'" } */ +s::list<1> OutputModuleListType; /* { dg-error "expected" } */