OSDN Git Service

PR c++/60248
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 21 Feb 2014 15:01:54 +0000 (15:01 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 21 Feb 2014 15:01:54 +0000 (15:01 +0000)
* mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@208005 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/mangle.c
gcc/testsuite/g++.dg/cpp0x/variadic149.C [new file with mode: 0644]

index fbcba47..a27488a 100644 (file)
@@ -1,3 +1,8 @@
+2014-02-21  Jason Merrill  <jason@redhat.com>
+
+       PR c++/60248
+       * mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.
+
 2014-02-20  Kai Tietz  <ktietz@redhat.com>
 
        PR c++/58873
index 2d1cd95..4f20af6 100644 (file)
@@ -3378,6 +3378,7 @@ mangle_decl (const tree decl)
 
   if (G.need_abi_warning
       /* Don't do this for a fake symbol we aren't going to emit anyway.  */
+      && TREE_CODE (decl) != TYPE_DECL
       && !DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (decl)
       && !DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P (decl))
     {
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic149.C b/gcc/testsuite/g++.dg/cpp0x/variadic149.C
new file mode 100644 (file)
index 0000000..a250e7c
--- /dev/null
@@ -0,0 +1,11 @@
+// PR c++/60248
+// { dg-options "-std=c++11 -g -fabi-version=2" }
+
+template<int...> struct A {};
+
+template<> struct A<0>
+{
+  typedef enum { e } B;
+};
+
+A<0> a;