aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/typeof4.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/ext/typeof4.C')
-rw-r--r--gcc/testsuite/g++.dg/ext/typeof4.C13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ext/typeof4.C b/gcc/testsuite/g++.dg/ext/typeof4.C
new file mode 100644
index 00000000000..2f423703514
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/typeof4.C
@@ -0,0 +1,13 @@
+// { dg-do compile }
+// { dg-options "" }
+
+// Origin: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
+
+// PR c++/9459: typeof in return type of template function
+
+void foo (int) {}
+void foo (double) {}
+
+template <typename C>
+typeof(foo(1))
+bar () { return foo(1); }