Hi,

On 01/28/2014 10:02 PM, Jason Merrill wrote:
On 01/28/2014 01:33 PM, Paolo Carlini wrote:
Ah! Then I guess that in order to fix c++/58561 only is_base_type needs
tweaking: shall we change the default to just return 0?
Makes sense.
Good. Then I'm finishing testing the below.

Thanks,
Paolo.

/////////////////
/cp
2013-10-30  Paolo Carlini  <paolo.carl...@oracle.com>

        PR c++/58581
        * call.c (build_over_call): Check return value of mark_used.

/testsuite
2013-10-30  Paolo Carlini  <paolo.carl...@oracle.com>

        PR c++/58581
        * g++.dg/cpp0x/deleted1.C: New.
Index: dwarf2out.c
===================================================================
--- dwarf2out.c (revision 207199)
+++ dwarf2out.c (working copy)
@@ -10252,6 +10252,16 @@ is_base_type (tree type)
       return 0;
 
     default:
+      // A C++ function with deduced return type can have
+      // a TEMPLATE_TYPE_PARM named 'auto' in its type.
+      if (is_cxx ())
+       {
+         tree name = TYPE_NAME (type);
+         if (TREE_CODE (name) == TYPE_DECL)
+           name = DECL_NAME (name);
+         if (name == get_identifier ("auto"))
+           return 0;
+       }
       gcc_unreachable ();
     }
 
Index: testsuite/g++.dg/cpp1y/auto-fn23.C
===================================================================
--- testsuite/g++.dg/cpp1y/auto-fn23.C  (revision 0)
+++ testsuite/g++.dg/cpp1y/auto-fn23.C  (working copy)
@@ -0,0 +1,9 @@
+// PR c++/58561
+// { dg-options "-std=c++1y -g" }
+
+auto foo();
+
+namespace N
+{
+  using ::foo;
+}

Reply via email to