]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/58561 ([c++11] ICE using declaration of function with auto in return type)
authorDavid Edelsohn <dje.gcc@gmail.com>
Mon, 24 Nov 2014 14:59:52 +0000 (14:59 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Mon, 24 Nov 2014 14:59:52 +0000 (09:59 -0500)
        PR c++/58561
        * dbxout.c: Include stringpool.h
        (dbxout_type) [default]: Ignore auto type.

From-SVN: r218020

gcc/ChangeLog
gcc/dbxout.c

index cadd82f65c72d7d3382f3fb53ade8f5c33d6ae6a..6bc1bb13adb647c326fe974e03b0dca9d674acc3 100644 (file)
@@ -1,3 +1,9 @@
+2014-11-24  David Edelsohn  <dje.gcc@gmail.com>
+
+       PR c++/58561
+       * dbxout.c: Include stringpool.h
+       (dbxout_type) [default]: Ignore auto type.
+
 2014-11-24  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/63679
index 1f04f72cbb53e5754ed3ff69b2e65bd19b53556c..207db1094d585882daf5ea32eccb5ef46a81217e 100644 (file)
@@ -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 ();
     }
 }