re PR c++/78761 (C++14, compiler generate mangled name that can not be demangled)
authorJakub Jelinek <jakub@redhat.com>
Tue, 13 Dec 2016 06:16:05 +0000 (07:16 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 13 Dec 2016 06:16:05 +0000 (07:16 +0100)
PR c++/78761
* cp-demangle.c (cplus_demangle_type): Demangle Dc as decltype(auto).
* testsuite/demangle-expected: Add test for decltype(auto).

From-SVN: r243593

libiberty/ChangeLog
libiberty/cp-demangle.c
libiberty/testsuite/demangle-expected

index f2e6b373e01a0c997c697e9511b1df3909e11eb7..15f9613b5490bea8005301bb01da38f9908f5ff3 100644 (file)
@@ -1,3 +1,9 @@
+2016-12-13  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/78761
+       * cp-demangle.c (cplus_demangle_type): Demangle Dc as decltype(auto).
+       * testsuite/demangle-expected: Add test for decltype(auto).
+
 2016-12-12  Nathan Sidwell  <nathan@acm.org>
 
        PR c++/78252
index 6c2f902955e6a298b98b645d86ad1e1b4e617391..510eb455841efb37a67e2dfe683db23db07bebd4 100644 (file)
@@ -2593,7 +2593,11 @@ cplus_demangle_type (struct d_info *di)
          /* auto */
          ret = d_make_name (di, "auto", 4);
          break;
-         
+       case 'c':
+         /* decltype(auto) */
+         ret = d_make_name (di, "decltype(auto)", 14);
+         break;
+
        case 'f':
          /* 32-bit decimal floating point */
          ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[26]);
index 803decdb096babc2e1b3d4e7bdac3dda2f83aff2..b65dcd3450e9a7de1788b25aeae25fe2ef62a83b 100644 (file)
@@ -4200,6 +4200,9 @@ decltype (new auto({parm#1})) f<int>(int)
 _Z1fIiERDaRKT_S1_
 auto& f<int>(int const&, int)
 --format=gnu-v3
+_Z1gIiEDcRKT_S0_
+decltype(auto) g<int>(int const&, int)
+--format=gnu-v3
 _Z1gILi1EEvR1AIXT_EER1BIXscbT_EE
 void g<1>(A<1>&, B<static_cast<bool>(1)>&)
 --format=gnu-v3