The patch for PR c++/58561 fixed DWARF, but did not fix Stabs debugging. The follow patch at least stops G++ from ICE'ing for a return type of auto. I'm not sure what type of debugging stabs should generate, if it can represent it.
Thanks, David PR c++/58561 * dbxout.c: Include stringpool.h (dbxout_type) [default]: Ignore auto type. Index: dbxout.c =================================================================== --- dbxout.c (revision 217982) +++ dbxout.c (working copy) @@ -103,6 +103,7 @@ along with GCC; see the file COPYING3. If not see #include "plugin-api.h" #include "ipa-ref.h" #include "cgraph.h" +#include "stringpool.h" #ifdef XCOFF_DEBUGGING_INFO #include "xcoffout.h" @@ -2329,6 +2330,17 @@ dbxout_type (tree type, int full) break; default: + /* A C++ function with deduced return type can have a TEMPLATE_TYPE_PARM + named 'auto' in its type. + No debug info for TEMPLATE_TYPE_PARM type supported yet. */ + if (lang_GNU_CXX ()) + { + tree name = TYPE_IDENTIFIER (type); + if (name == get_identifier ("auto") + || name == get_identifier ("decltype(auto)")) + break; + } + gcc_unreachable (); } }