summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/diagnostic/using1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/diagnostic/using1.C')
-rw-r--r--gcc/testsuite/g++.dg/diagnostic/using1.C16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/diagnostic/using1.C b/gcc/testsuite/g++.dg/diagnostic/using1.C
new file mode 100644
index 00000000000..eb4f18d1d8b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/diagnostic/using1.C
@@ -0,0 +1,16 @@
+// PR c++/102987
+// { dg-do compile { target c++11 } }
+
+struct a {
+ bool b();
+};
+template <typename c> struct d : c {
+ using c::e;
+ using f = d;
+ constexpr int g(decltype(e.b())) { return buh; } // { dg-error "buh" }
+};
+struct h {
+ a e;
+};
+using i = d<h>;
+auto j = i{}.g(1);