summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/regress/non-const1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/regress/non-const1.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/non-const1.C9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/non-const1.C b/gcc/testsuite/g++.dg/cpp0x/regress/non-const1.C
new file mode 100644
index 000000000..7fc66a7ae
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/regress/non-const1.C
@@ -0,0 +1,9 @@
+// PR c++/48015
+// { dg-options -std=c++0x }
+
+template <typename T> T f(T);
+template <typename T> void g()
+{
+ int const c = f (1);
+ int i = c - 0;
+}