summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/rtti/anon-ns1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/rtti/anon-ns1.C')
-rw-r--r--gcc/testsuite/g++.dg/rtti/anon-ns1.C15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/rtti/anon-ns1.C b/gcc/testsuite/g++.dg/rtti/anon-ns1.C
new file mode 100644
index 000000000..e18be4300
--- /dev/null
+++ b/gcc/testsuite/g++.dg/rtti/anon-ns1.C
@@ -0,0 +1,15 @@
+// PR c++/49440
+// The typeinfo name for A should start with * so we compare
+// it by address rather than contents.
+
+// { dg-final { scan-assembler "\"\*N\[^\"\]+1AE" } }
+
+namespace
+{
+ class A { };
+}
+
+void f()
+{
+ throw A();
+}