summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/local5.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/template/local5.C')
-rw-r--r--gcc/testsuite/g++.dg/template/local5.C12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/local5.C b/gcc/testsuite/g++.dg/template/local5.C
new file mode 100644
index 000000000..705dca39e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/local5.C
@@ -0,0 +1,12 @@
+struct Attribute { };
+
+template <class T> bool operator == (const Attribute &attr, const T &value);
+
+enum {
+ anon = 123
+};
+
+void test(int foo)
+{
+ if (foo == anon) ; /* { dg-bogus "anonymous type" } */
+}