diff options
author | David Carlton <carlton@bactrian.org> | 2004-01-23 21:55:57 +0000 |
---|---|---|
committer | David Carlton <carlton@bactrian.org> | 2004-01-23 21:55:57 +0000 |
commit | 37fc574aa0dd02a486959c108328ebafd18776a0 (patch) | |
tree | 4944ea3eb431a8c46ae85ae615765cf5be390d2c /gdb/testsuite/gdb.cp | |
parent | a1b8c0673d81e41d4fc3919cc7a275794754c939 (diff) | |
download | gdb-37fc574aa0dd02a486959c108328ebafd18776a0.zip gdb-37fc574aa0dd02a486959c108328ebafd18776a0.tar.gz gdb-37fc574aa0dd02a486959c108328ebafd18776a0.tar.bz2 |
2004-01-23 David Carlton <carlton@kealia.com>
* gdb.cp/namespace.cc (C::ensureRefs): New.
* gdb.cp/namespace1.cc (C::ensureOtherRefs): New.
Diffstat (limited to 'gdb/testsuite/gdb.cp')
-rw-r--r-- | gdb/testsuite/gdb.cp/namespace.cc | 7 | ||||
-rw-r--r-- | gdb/testsuite/gdb.cp/namespace1.cc | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.cp/namespace.cc b/gdb/testsuite/gdb.cp/namespace.cc index 6a68373..ee55168 100644 --- a/gdb/testsuite/gdb.cp/namespace.cc +++ b/gdb/testsuite/gdb.cp/namespace.cc @@ -97,6 +97,13 @@ namespace C }; }; + void ensureRefs () { + // NOTE (2004-04-23, carlton): This function is here only to make + // sure that GCC 3.4 outputs debug info for these classes. + static CClass *c = new CClass(); + static CClass::NestedClass *n = new CClass::NestedClass(); + } + namespace { int cX = 6; diff --git a/gdb/testsuite/gdb.cp/namespace1.cc b/gdb/testsuite/gdb.cp/namespace1.cc index 5d66810..53b3e57 100644 --- a/gdb/testsuite/gdb.cp/namespace1.cc +++ b/gdb/testsuite/gdb.cp/namespace1.cc @@ -24,6 +24,12 @@ namespace C int z; }; + void ensureOtherRefs () { + // NOTE (2004-04-23, carlton): This function is here only to make + // sure that GCC 3.4 outputs debug info for this class. + static OtherFileClass *c = new OtherFileClass(); + } + namespace { int cXOtherFile = 29; }; |