re PR c++/89356 (sorry, unimplemented: mangling implicit_conv_expr in nodejs8 package...
authorMarek Polacek <polacek@redhat.com>
Sun, 17 Feb 2019 17:53:54 +0000 (17:53 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Sun, 17 Feb 2019 17:53:54 +0000 (17:53 +0000)
PR c++/89356
* g++.dg/abi/mangle68.C: New test.
* g++.dg/cpp0x/decltype69.C: New test.

From-SVN: r268972

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/abi/mangle68.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/decltype69.C [new file with mode: 0644]

index e128474dc9e10985298f21cd906c48e5f35082c2..1e4d9670af022f64afcd39ca633c842efa80bb4f 100644 (file)
@@ -8,6 +8,10 @@
        PR c++/89315
        * g++.dg/cpp0x/initlist114.C: New test.
 
+       PR c++/89356
+       * g++.dg/abi/mangle68.C: New test.
+       * g++.dg/cpp0x/decltype69.C: New test.
+
 2019-02-16  David Malcolm  <dmalcolm@redhat.com>
 
        PR c++/88680
diff --git a/gcc/testsuite/g++.dg/abi/mangle68.C b/gcc/testsuite/g++.dg/abi/mangle68.C
new file mode 100644 (file)
index 0000000..3e16eeb
--- /dev/null
@@ -0,0 +1,8 @@
+// PR c++/89356
+// { dg-do compile { target c++11 } }
+
+template<typename T>
+auto fn () -> decltype(unsigned{2u} + (T)3) { return 42; }
+
+// { dg-final { scan-assembler "_Z2fnIiEDTpltljLj2EEcvT_Li3EEv" } }
+template auto fn<int>() -> decltype(unsigned{2u} + (int)3);
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype69.C b/gcc/testsuite/g++.dg/cpp0x/decltype69.C
new file mode 100644 (file)
index 0000000..849a244
--- /dev/null
@@ -0,0 +1,10 @@
+// PR c++/89356
+// { dg-do compile { target c++11 } }
+
+typedef unsigned a;
+template <typename> struct h {};
+template <int, class b> auto c(b f) -> h<decltype(f(a{0}))>;
+typedef char byte;
+enum d : byte;
+d g(byte);
+h<d> e = c<6>(g);