aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp/nsrecurs.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.cp/nsrecurs.cc')
-rw-r--r--gdb/testsuite/gdb.cp/nsrecurs.cc30
1 files changed, 30 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.cp/nsrecurs.cc b/gdb/testsuite/gdb.cp/nsrecurs.cc
new file mode 100644
index 0000000..84605a6
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/nsrecurs.cc
@@ -0,0 +1,30 @@
+namespace A{
+ int ax = 9;
+}
+
+namespace B{
+ using namespace A;
+}
+
+namespace C{
+ using namespace B;
+}
+
+//---------------
+namespace D{
+ using namespace D;
+ int dx = 99;
+}
+using namespace C;
+
+//---------------
+namespace{
+ namespace{
+ int xx = 999;
+ }
+}
+
+int main(){
+ using namespace D;
+ return ax + dx + xx;
+}