]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/60248 ([C++11] ICE specializing variadic template)
authorJason Merrill <jason@redhat.com>
Fri, 21 Feb 2014 14:56:38 +0000 (09:56 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 21 Feb 2014 14:56:38 +0000 (09:56 -0500)
PR c++/60248
* mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.

From-SVN: r208000

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

index 28ce7255a4620b7ea0574a8eb2f27eaa30755d10..0dff5160967274ea009536c55e01f3e773171ef0 100644 (file)
@@ -1,5 +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.
+
        PR c++/60252
        * lambda.c (maybe_resolve_dummy): Don't try to capture this
        in declaration context.
index 7bb6f4b0199c2254be60035e9d270c4550c02b7e..251edb14d16e1929b35dbd82acc70d5cdaebe1c3 100644 (file)
@@ -3485,6 +3485,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;