re PR c++/81860 (Call to undefined inline function involving inheriting constructors)
authorMarek Polacek <mpolacek@gcc.gnu.org>
Tue, 2 Jan 2018 15:05:09 +0000 (15:05 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Tue, 2 Jan 2018 15:05:09 +0000 (15:05 +0000)
PR c++/81860
* g++.dg/cpp0x/inh-ctor30.C: New test.

From-SVN: r256076

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/inh-ctor30.C [new file with mode: 0644]

index 522573ffb903509fb7807b2783b5a2bc033f7b65..6cc4c4db8296727df88700defd322e71b5b19c19 100644 (file)
@@ -1,3 +1,7 @@
+2018-01-02  Richard Biener  <rguenther@suse.de>
+
+       * ipa-inline.c (big_speedup_p): Fix expression.
+
 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
 
        PR target/81616
index 223877e2b440442118e730b415e015bd075e7fef..9b88e6c05e38426df11d6595626f7b488e32b63c 100644 (file)
@@ -1,6 +1,7 @@
-2018-01-02  Richard Biener  <rguenther@suse.de>
+2018-01-02  Marek Polacek  <polacek@redhat.com>
 
-       * ipa-inline.c (big_speedup_p): Fix expression.
+       PR c++/81860
+       * g++.dg/cpp0x/inh-ctor30.C: New test.
 
 2018-01-01  Paul Thomas  <pault@gcc.gnu.org>
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/inh-ctor30.C b/gcc/testsuite/g++.dg/cpp0x/inh-ctor30.C
new file mode 100644 (file)
index 0000000..f40b052
--- /dev/null
@@ -0,0 +1,27 @@
+// PR c++/81860
+// { dg-do compile { target c++11 } }
+// { dg-final { scan-assembler "_ZN1AIjEC2Ev" } }
+
+template <typename T>
+struct A
+{
+  A() {}
+};
+
+struct B
+{
+  template <typename D>
+  B(D, const A<unsigned>& a = A<unsigned>()) : a(a) {}
+
+  A<unsigned> a;
+};
+
+struct C : B
+{
+  using B::B;
+};
+
+int main()
+{
+  C c(0);
+}