From ba8b121f06fc0099f8e12683d6038353ebf85f8a Mon Sep 17 00:00:00 2001 From: chastain Date: Sat, 23 Aug 2003 03:55:58 +0000 Subject: [PATCH] 2003-08-22 Michael Chastain * gdb.cp: New directory. * gdb.cp/*: Copy from gdb.c++/*. * gdb.c++/*: Remove. * Makefile.in: Change gdb.c++ to gdb.cp. * configure.in: Ditto. * configure: Regnerate. --- gdb/testsuite/ChangeLog | 9 +++ gdb/testsuite/Makefile.in | 2 +- gdb/testsuite/configure | 4 +- gdb/testsuite/configure.in | 2 +- gdb/testsuite/gdb.c++/ref-types.cc | 30 --------- gdb/testsuite/{gdb.c++ => gdb.cp}/Makefile.in | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/ambiguous.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/ambiguous.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/annota2.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/annota2.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/annota3.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/annota3.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/anon-union.cc | 23 +++---- gdb/testsuite/{gdb.c++ => gdb.cp}/anon-union.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/casts.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/casts.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/classes.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/cplusfuncs.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/cplusfuncs.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/ctti.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/cttiadd.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/cttiadd1.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/cttiadd2.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/cttiadd3.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/demangle.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/derivation.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/derivation.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/hang.H | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/hang.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/hang1.C | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/hang2.C | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/hang3.C | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/inherit.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/local.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/local.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/m-data.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/m-data.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/m-static.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/m-static.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/m-static.h | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/m-static1.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/maint.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/member-ptr.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/member-ptr.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/method.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/method.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/misc.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/misc.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/namespace.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/namespace.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/namespace1.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/overload.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/overload.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/ovldbreak.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/ovldbreak.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/pr-1023.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/pr-1023.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/pr-1210.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/pr-1210.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/pr-574.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/pr-574.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/printmethod.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/printmethod.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/psmang.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/psmang1.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/psmang2.cc | 0 gdb/testsuite/gdb.cp/ref-types.cc | 79 +++++++++++++++++++++++ gdb/testsuite/{gdb.c++ => gdb.cp}/ref-types.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/rtti.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/rtti.h | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/rtti1.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/rtti2.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/templates.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/templates.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/try_catch.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/try_catch.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/userdef.cc | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/userdef.exp | 0 gdb/testsuite/{gdb.c++ => gdb.cp}/virtfunc.cc | 4 +- gdb/testsuite/{gdb.c++ => gdb.cp}/virtfunc.exp | 0 80 files changed, 107 insertions(+), 46 deletions(-) delete mode 100644 gdb/testsuite/gdb.c++/ref-types.cc rename gdb/testsuite/{gdb.c++ => gdb.cp}/Makefile.in (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/ambiguous.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/ambiguous.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/annota2.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/annota2.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/annota3.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/annota3.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/anon-union.cc (86%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/anon-union.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/casts.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/casts.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/classes.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/cplusfuncs.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/cplusfuncs.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/ctti.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/cttiadd.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/cttiadd1.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/cttiadd2.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/cttiadd3.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/demangle.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/derivation.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/derivation.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/hang.H (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/hang.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/hang1.C (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/hang2.C (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/hang3.C (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/inherit.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/local.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/local.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/m-data.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/m-data.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/m-static.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/m-static.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/m-static.h (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/m-static1.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/maint.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/member-ptr.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/member-ptr.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/method.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/method.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/misc.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/misc.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/namespace.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/namespace.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/namespace1.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/overload.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/overload.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/ovldbreak.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/ovldbreak.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/pr-1023.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/pr-1023.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/pr-1210.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/pr-1210.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/pr-574.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/pr-574.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/printmethod.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/printmethod.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/psmang.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/psmang1.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/psmang2.cc (100%) create mode 100644 gdb/testsuite/gdb.cp/ref-types.cc rename gdb/testsuite/{gdb.c++ => gdb.cp}/ref-types.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/rtti.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/rtti.h (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/rtti1.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/rtti2.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/templates.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/templates.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/try_catch.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/try_catch.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/userdef.cc (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/userdef.exp (100%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/virtfunc.cc (98%) rename gdb/testsuite/{gdb.c++ => gdb.cp}/virtfunc.exp (100%) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 865793576a..c32a6a5863 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2003-08-22 Michael Chastain + + * gdb.cp: New directory. + * gdb.cp/*: Copy from gdb.c++/*. + * gdb.c++/*: Remove. + * Makefile.in: Change gdb.c++ to gdb.cp. + * configure.in: Ditto. + * configure: Regnerate. + 2003-08-18 Mark Kettenis * gdb.arch/i386-prologue.exp: Add testcase for PR backtrace/1338. diff --git a/gdb/testsuite/Makefile.in b/gdb/testsuite/Makefile.in index 898e6ed28b..3f3b7ad2bb 100644 --- a/gdb/testsuite/Makefile.in +++ b/gdb/testsuite/Makefile.in @@ -35,7 +35,7 @@ SHELL = @SHELL@ EXEEXT = @EXEEXT@ SUBDIRS = @subdirs@ RPATH_ENVVAR = @RPATH_ENVVAR@ -ALL_SUBDIRS = gdb.arch gdb.asm gdb.base gdb.c++ gdb.disasm gdb.java gdb.mi \ +ALL_SUBDIRS = gdb.arch gdb.asm gdb.base gdb.cp gdb.disasm gdb.java gdb.mi \ gdb.objc gdb.threads gdb.trace $(SUBDIRS) EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; then \ diff --git a/gdb/testsuite/configure b/gdb/testsuite/configure index eb505fe52c..f5cb0895a2 100755 --- a/gdb/testsuite/configure +++ b/gdb/testsuite/configure @@ -1050,7 +1050,7 @@ done ac_given_srcdir=$srcdir trap 'rm -fr `echo "Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile \ - gdb.c++/Makefile gdb.disasm/Makefile gdb.java/Makefile gdb.mi/Makefile \ + gdb.cp/Makefile gdb.disasm/Makefile gdb.java/Makefile gdb.mi/Makefile \ gdb.objc/Makefile gdb.threads/Makefile gdb.trace/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF diff --git a/gdb/testsuite/configure.in b/gdb/testsuite/configure.in index 14300ec094..c60cf576a4 100644 --- a/gdb/testsuite/configure.in +++ b/gdb/testsuite/configure.in @@ -113,5 +113,5 @@ AC_EXEEXT AC_CONFIG_SUBDIRS($configdirs) AC_OUTPUT([Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile \ - gdb.c++/Makefile gdb.disasm/Makefile gdb.java/Makefile gdb.mi/Makefile \ + gdb.cp/Makefile gdb.disasm/Makefile gdb.java/Makefile gdb.mi/Makefile \ gdb.objc/Makefile gdb.threads/Makefile gdb.trace/Makefile]) diff --git a/gdb/testsuite/gdb.c++/ref-types.cc b/gdb/testsuite/gdb.c++/ref-types.cc deleted file mode 100644 index 8ee5c405d8..0000000000 --- a/gdb/testsuite/gdb.c++/ref-types.cc +++ /dev/null @@ -1,30 +0,0 @@ -void marker1 (void) -{ - -} - - - -int main(void) -{ - short s; - short &rs = s; - short *ps; - short *&rps = ps; - short as[4]; - short (&ras)[4] = as; - s = -1; - ps = &s; - as[0] = 0; - as[1] = 1; - as[2] = 2; - as[3] = 3; - - #ifdef usestubs - set_debug_traps(); - breakpoint(); - #endif - marker1(); - - return 0; -} diff --git a/gdb/testsuite/gdb.c++/Makefile.in b/gdb/testsuite/gdb.cp/Makefile.in similarity index 100% rename from gdb/testsuite/gdb.c++/Makefile.in rename to gdb/testsuite/gdb.cp/Makefile.in diff --git a/gdb/testsuite/gdb.c++/ambiguous.cc b/gdb/testsuite/gdb.cp/ambiguous.cc similarity index 100% rename from gdb/testsuite/gdb.c++/ambiguous.cc rename to gdb/testsuite/gdb.cp/ambiguous.cc diff --git a/gdb/testsuite/gdb.c++/ambiguous.exp b/gdb/testsuite/gdb.cp/ambiguous.exp similarity index 100% rename from gdb/testsuite/gdb.c++/ambiguous.exp rename to gdb/testsuite/gdb.cp/ambiguous.exp diff --git a/gdb/testsuite/gdb.c++/annota2.cc b/gdb/testsuite/gdb.cp/annota2.cc similarity index 100% rename from gdb/testsuite/gdb.c++/annota2.cc rename to gdb/testsuite/gdb.cp/annota2.cc diff --git a/gdb/testsuite/gdb.c++/annota2.exp b/gdb/testsuite/gdb.cp/annota2.exp similarity index 100% rename from gdb/testsuite/gdb.c++/annota2.exp rename to gdb/testsuite/gdb.cp/annota2.exp diff --git a/gdb/testsuite/gdb.c++/annota3.cc b/gdb/testsuite/gdb.cp/annota3.cc similarity index 100% rename from gdb/testsuite/gdb.c++/annota3.cc rename to gdb/testsuite/gdb.cp/annota3.cc diff --git a/gdb/testsuite/gdb.c++/annota3.exp b/gdb/testsuite/gdb.cp/annota3.exp similarity index 100% rename from gdb/testsuite/gdb.c++/annota3.exp rename to gdb/testsuite/gdb.cp/annota3.exp diff --git a/gdb/testsuite/gdb.c++/anon-union.cc b/gdb/testsuite/gdb.cp/anon-union.cc similarity index 86% rename from gdb/testsuite/gdb.c++/anon-union.cc rename to gdb/testsuite/gdb.cp/anon-union.cc index c58a306822..0b3fd130ae 100644 --- a/gdb/testsuite/gdb.c++/anon-union.cc +++ b/gdb/testsuite/gdb.cp/anon-union.cc @@ -4,13 +4,13 @@ struct Foo { int zero; unsigned int one; } num1; - - union { - int pebble; - struct { + struct X { int rock; unsigned int rock2; - } x; + }; + union { + int pebble; + X x; union { int qux; unsigned int mux; @@ -32,22 +32,23 @@ union Bar { unsigned int y; }; -Foo foo; -Bar bar; int main() { + Foo foo = {0, 0}; + foo.paper = 33; foo.pebble = 44; foo.mux = 55; - bar.x = 33; + Bar bar = {0}; - union - { + union { int z; unsigned int w; - }; + }; w = 0; + + bar.x = 33; w = 45; diff --git a/gdb/testsuite/gdb.c++/anon-union.exp b/gdb/testsuite/gdb.cp/anon-union.exp similarity index 100% rename from gdb/testsuite/gdb.c++/anon-union.exp rename to gdb/testsuite/gdb.cp/anon-union.exp diff --git a/gdb/testsuite/gdb.c++/casts.cc b/gdb/testsuite/gdb.cp/casts.cc similarity index 100% rename from gdb/testsuite/gdb.c++/casts.cc rename to gdb/testsuite/gdb.cp/casts.cc diff --git a/gdb/testsuite/gdb.c++/casts.exp b/gdb/testsuite/gdb.cp/casts.exp similarity index 100% rename from gdb/testsuite/gdb.c++/casts.exp rename to gdb/testsuite/gdb.cp/casts.exp diff --git a/gdb/testsuite/gdb.c++/classes.exp b/gdb/testsuite/gdb.cp/classes.exp similarity index 100% rename from gdb/testsuite/gdb.c++/classes.exp rename to gdb/testsuite/gdb.cp/classes.exp diff --git a/gdb/testsuite/gdb.c++/cplusfuncs.cc b/gdb/testsuite/gdb.cp/cplusfuncs.cc similarity index 100% rename from gdb/testsuite/gdb.c++/cplusfuncs.cc rename to gdb/testsuite/gdb.cp/cplusfuncs.cc diff --git a/gdb/testsuite/gdb.c++/cplusfuncs.exp b/gdb/testsuite/gdb.cp/cplusfuncs.exp similarity index 100% rename from gdb/testsuite/gdb.c++/cplusfuncs.exp rename to gdb/testsuite/gdb.cp/cplusfuncs.exp diff --git a/gdb/testsuite/gdb.c++/ctti.exp b/gdb/testsuite/gdb.cp/ctti.exp similarity index 100% rename from gdb/testsuite/gdb.c++/ctti.exp rename to gdb/testsuite/gdb.cp/ctti.exp diff --git a/gdb/testsuite/gdb.c++/cttiadd.cc b/gdb/testsuite/gdb.cp/cttiadd.cc similarity index 100% rename from gdb/testsuite/gdb.c++/cttiadd.cc rename to gdb/testsuite/gdb.cp/cttiadd.cc diff --git a/gdb/testsuite/gdb.c++/cttiadd1.cc b/gdb/testsuite/gdb.cp/cttiadd1.cc similarity index 100% rename from gdb/testsuite/gdb.c++/cttiadd1.cc rename to gdb/testsuite/gdb.cp/cttiadd1.cc diff --git a/gdb/testsuite/gdb.c++/cttiadd2.cc b/gdb/testsuite/gdb.cp/cttiadd2.cc similarity index 100% rename from gdb/testsuite/gdb.c++/cttiadd2.cc rename to gdb/testsuite/gdb.cp/cttiadd2.cc diff --git a/gdb/testsuite/gdb.c++/cttiadd3.cc b/gdb/testsuite/gdb.cp/cttiadd3.cc similarity index 100% rename from gdb/testsuite/gdb.c++/cttiadd3.cc rename to gdb/testsuite/gdb.cp/cttiadd3.cc diff --git a/gdb/testsuite/gdb.c++/demangle.exp b/gdb/testsuite/gdb.cp/demangle.exp similarity index 100% rename from gdb/testsuite/gdb.c++/demangle.exp rename to gdb/testsuite/gdb.cp/demangle.exp diff --git a/gdb/testsuite/gdb.c++/derivation.cc b/gdb/testsuite/gdb.cp/derivation.cc similarity index 100% rename from gdb/testsuite/gdb.c++/derivation.cc rename to gdb/testsuite/gdb.cp/derivation.cc diff --git a/gdb/testsuite/gdb.c++/derivation.exp b/gdb/testsuite/gdb.cp/derivation.exp similarity index 100% rename from gdb/testsuite/gdb.c++/derivation.exp rename to gdb/testsuite/gdb.cp/derivation.exp diff --git a/gdb/testsuite/gdb.c++/hang.H b/gdb/testsuite/gdb.cp/hang.H similarity index 100% rename from gdb/testsuite/gdb.c++/hang.H rename to gdb/testsuite/gdb.cp/hang.H diff --git a/gdb/testsuite/gdb.c++/hang.exp b/gdb/testsuite/gdb.cp/hang.exp similarity index 100% rename from gdb/testsuite/gdb.c++/hang.exp rename to gdb/testsuite/gdb.cp/hang.exp diff --git a/gdb/testsuite/gdb.c++/hang1.C b/gdb/testsuite/gdb.cp/hang1.C similarity index 100% rename from gdb/testsuite/gdb.c++/hang1.C rename to gdb/testsuite/gdb.cp/hang1.C diff --git a/gdb/testsuite/gdb.c++/hang2.C b/gdb/testsuite/gdb.cp/hang2.C similarity index 100% rename from gdb/testsuite/gdb.c++/hang2.C rename to gdb/testsuite/gdb.cp/hang2.C diff --git a/gdb/testsuite/gdb.c++/hang3.C b/gdb/testsuite/gdb.cp/hang3.C similarity index 100% rename from gdb/testsuite/gdb.c++/hang3.C rename to gdb/testsuite/gdb.cp/hang3.C diff --git a/gdb/testsuite/gdb.c++/inherit.exp b/gdb/testsuite/gdb.cp/inherit.exp similarity index 100% rename from gdb/testsuite/gdb.c++/inherit.exp rename to gdb/testsuite/gdb.cp/inherit.exp diff --git a/gdb/testsuite/gdb.c++/local.cc b/gdb/testsuite/gdb.cp/local.cc similarity index 100% rename from gdb/testsuite/gdb.c++/local.cc rename to gdb/testsuite/gdb.cp/local.cc diff --git a/gdb/testsuite/gdb.c++/local.exp b/gdb/testsuite/gdb.cp/local.exp similarity index 100% rename from gdb/testsuite/gdb.c++/local.exp rename to gdb/testsuite/gdb.cp/local.exp diff --git a/gdb/testsuite/gdb.c++/m-data.cc b/gdb/testsuite/gdb.cp/m-data.cc similarity index 100% rename from gdb/testsuite/gdb.c++/m-data.cc rename to gdb/testsuite/gdb.cp/m-data.cc diff --git a/gdb/testsuite/gdb.c++/m-data.exp b/gdb/testsuite/gdb.cp/m-data.exp similarity index 100% rename from gdb/testsuite/gdb.c++/m-data.exp rename to gdb/testsuite/gdb.cp/m-data.exp diff --git a/gdb/testsuite/gdb.c++/m-static.cc b/gdb/testsuite/gdb.cp/m-static.cc similarity index 100% rename from gdb/testsuite/gdb.c++/m-static.cc rename to gdb/testsuite/gdb.cp/m-static.cc diff --git a/gdb/testsuite/gdb.c++/m-static.exp b/gdb/testsuite/gdb.cp/m-static.exp similarity index 100% rename from gdb/testsuite/gdb.c++/m-static.exp rename to gdb/testsuite/gdb.cp/m-static.exp diff --git a/gdb/testsuite/gdb.c++/m-static.h b/gdb/testsuite/gdb.cp/m-static.h similarity index 100% rename from gdb/testsuite/gdb.c++/m-static.h rename to gdb/testsuite/gdb.cp/m-static.h diff --git a/gdb/testsuite/gdb.c++/m-static1.cc b/gdb/testsuite/gdb.cp/m-static1.cc similarity index 100% rename from gdb/testsuite/gdb.c++/m-static1.cc rename to gdb/testsuite/gdb.cp/m-static1.cc diff --git a/gdb/testsuite/gdb.c++/maint.exp b/gdb/testsuite/gdb.cp/maint.exp similarity index 100% rename from gdb/testsuite/gdb.c++/maint.exp rename to gdb/testsuite/gdb.cp/maint.exp diff --git a/gdb/testsuite/gdb.c++/member-ptr.cc b/gdb/testsuite/gdb.cp/member-ptr.cc similarity index 100% rename from gdb/testsuite/gdb.c++/member-ptr.cc rename to gdb/testsuite/gdb.cp/member-ptr.cc diff --git a/gdb/testsuite/gdb.c++/member-ptr.exp b/gdb/testsuite/gdb.cp/member-ptr.exp similarity index 100% rename from gdb/testsuite/gdb.c++/member-ptr.exp rename to gdb/testsuite/gdb.cp/member-ptr.exp diff --git a/gdb/testsuite/gdb.c++/method.cc b/gdb/testsuite/gdb.cp/method.cc similarity index 100% rename from gdb/testsuite/gdb.c++/method.cc rename to gdb/testsuite/gdb.cp/method.cc diff --git a/gdb/testsuite/gdb.c++/method.exp b/gdb/testsuite/gdb.cp/method.exp similarity index 100% rename from gdb/testsuite/gdb.c++/method.exp rename to gdb/testsuite/gdb.cp/method.exp diff --git a/gdb/testsuite/gdb.c++/misc.cc b/gdb/testsuite/gdb.cp/misc.cc similarity index 100% rename from gdb/testsuite/gdb.c++/misc.cc rename to gdb/testsuite/gdb.cp/misc.cc diff --git a/gdb/testsuite/gdb.c++/misc.exp b/gdb/testsuite/gdb.cp/misc.exp similarity index 100% rename from gdb/testsuite/gdb.c++/misc.exp rename to gdb/testsuite/gdb.cp/misc.exp diff --git a/gdb/testsuite/gdb.c++/namespace.cc b/gdb/testsuite/gdb.cp/namespace.cc similarity index 100% rename from gdb/testsuite/gdb.c++/namespace.cc rename to gdb/testsuite/gdb.cp/namespace.cc diff --git a/gdb/testsuite/gdb.c++/namespace.exp b/gdb/testsuite/gdb.cp/namespace.exp similarity index 100% rename from gdb/testsuite/gdb.c++/namespace.exp rename to gdb/testsuite/gdb.cp/namespace.exp diff --git a/gdb/testsuite/gdb.c++/namespace1.cc b/gdb/testsuite/gdb.cp/namespace1.cc similarity index 100% rename from gdb/testsuite/gdb.c++/namespace1.cc rename to gdb/testsuite/gdb.cp/namespace1.cc diff --git a/gdb/testsuite/gdb.c++/overload.cc b/gdb/testsuite/gdb.cp/overload.cc similarity index 100% rename from gdb/testsuite/gdb.c++/overload.cc rename to gdb/testsuite/gdb.cp/overload.cc diff --git a/gdb/testsuite/gdb.c++/overload.exp b/gdb/testsuite/gdb.cp/overload.exp similarity index 100% rename from gdb/testsuite/gdb.c++/overload.exp rename to gdb/testsuite/gdb.cp/overload.exp diff --git a/gdb/testsuite/gdb.c++/ovldbreak.cc b/gdb/testsuite/gdb.cp/ovldbreak.cc similarity index 100% rename from gdb/testsuite/gdb.c++/ovldbreak.cc rename to gdb/testsuite/gdb.cp/ovldbreak.cc diff --git a/gdb/testsuite/gdb.c++/ovldbreak.exp b/gdb/testsuite/gdb.cp/ovldbreak.exp similarity index 100% rename from gdb/testsuite/gdb.c++/ovldbreak.exp rename to gdb/testsuite/gdb.cp/ovldbreak.exp diff --git a/gdb/testsuite/gdb.c++/pr-1023.cc b/gdb/testsuite/gdb.cp/pr-1023.cc similarity index 100% rename from gdb/testsuite/gdb.c++/pr-1023.cc rename to gdb/testsuite/gdb.cp/pr-1023.cc diff --git a/gdb/testsuite/gdb.c++/pr-1023.exp b/gdb/testsuite/gdb.cp/pr-1023.exp similarity index 100% rename from gdb/testsuite/gdb.c++/pr-1023.exp rename to gdb/testsuite/gdb.cp/pr-1023.exp diff --git a/gdb/testsuite/gdb.c++/pr-1210.cc b/gdb/testsuite/gdb.cp/pr-1210.cc similarity index 100% rename from gdb/testsuite/gdb.c++/pr-1210.cc rename to gdb/testsuite/gdb.cp/pr-1210.cc diff --git a/gdb/testsuite/gdb.c++/pr-1210.exp b/gdb/testsuite/gdb.cp/pr-1210.exp similarity index 100% rename from gdb/testsuite/gdb.c++/pr-1210.exp rename to gdb/testsuite/gdb.cp/pr-1210.exp diff --git a/gdb/testsuite/gdb.c++/pr-574.cc b/gdb/testsuite/gdb.cp/pr-574.cc similarity index 100% rename from gdb/testsuite/gdb.c++/pr-574.cc rename to gdb/testsuite/gdb.cp/pr-574.cc diff --git a/gdb/testsuite/gdb.c++/pr-574.exp b/gdb/testsuite/gdb.cp/pr-574.exp similarity index 100% rename from gdb/testsuite/gdb.c++/pr-574.exp rename to gdb/testsuite/gdb.cp/pr-574.exp diff --git a/gdb/testsuite/gdb.c++/printmethod.cc b/gdb/testsuite/gdb.cp/printmethod.cc similarity index 100% rename from gdb/testsuite/gdb.c++/printmethod.cc rename to gdb/testsuite/gdb.cp/printmethod.cc diff --git a/gdb/testsuite/gdb.c++/printmethod.exp b/gdb/testsuite/gdb.cp/printmethod.exp similarity index 100% rename from gdb/testsuite/gdb.c++/printmethod.exp rename to gdb/testsuite/gdb.cp/printmethod.exp diff --git a/gdb/testsuite/gdb.c++/psmang.exp b/gdb/testsuite/gdb.cp/psmang.exp similarity index 100% rename from gdb/testsuite/gdb.c++/psmang.exp rename to gdb/testsuite/gdb.cp/psmang.exp diff --git a/gdb/testsuite/gdb.c++/psmang1.cc b/gdb/testsuite/gdb.cp/psmang1.cc similarity index 100% rename from gdb/testsuite/gdb.c++/psmang1.cc rename to gdb/testsuite/gdb.cp/psmang1.cc diff --git a/gdb/testsuite/gdb.c++/psmang2.cc b/gdb/testsuite/gdb.cp/psmang2.cc similarity index 100% rename from gdb/testsuite/gdb.c++/psmang2.cc rename to gdb/testsuite/gdb.cp/psmang2.cc diff --git a/gdb/testsuite/gdb.cp/ref-types.cc b/gdb/testsuite/gdb.cp/ref-types.cc new file mode 100644 index 0000000000..23cc51095e --- /dev/null +++ b/gdb/testsuite/gdb.cp/ref-types.cc @@ -0,0 +1,79 @@ +int main2(void); + +void marker1 (void) +{ + +} + + + +int main(void) +{ + short s; + short &rs = s; + short *ps; + short *&rps = ps; + short as[4]; + short (&ras)[4] = as; + s = -1; + ps = &s; + as[0] = 0; + as[1] = 1; + as[2] = 2; + as[3] = 3; + + #ifdef usestubs + set_debug_traps(); + breakpoint(); + #endif + marker1(); + + main2(); + + return 0; +} + +int f() +{ + int f1; + f1 = 1; + return f1; +} + +int main2(void) +{ + char C; + unsigned char UC; + short S; + unsigned short US; + int I; + unsigned int UI; + long L; + unsigned long UL; + float F; + double D; + char &rC = C; + unsigned char &rUC = UC; + short &rS = S; + unsigned short &rUS = US; + int &rI = I; + unsigned int &rUI = UI; + long &rL = L; + unsigned long &rUL = UL; + float &rF = F; + double &rD = D; + C = 'A'; + UC = 21; + S = -14; + US = 7; + I = 102; + UI = 1002; + L = -234; + UL = 234; + F = 1.25E10; + D = -1.375E-123; + I = f(); + + return 0; + +} diff --git a/gdb/testsuite/gdb.c++/ref-types.exp b/gdb/testsuite/gdb.cp/ref-types.exp similarity index 100% rename from gdb/testsuite/gdb.c++/ref-types.exp rename to gdb/testsuite/gdb.cp/ref-types.exp diff --git a/gdb/testsuite/gdb.c++/rtti.exp b/gdb/testsuite/gdb.cp/rtti.exp similarity index 100% rename from gdb/testsuite/gdb.c++/rtti.exp rename to gdb/testsuite/gdb.cp/rtti.exp diff --git a/gdb/testsuite/gdb.c++/rtti.h b/gdb/testsuite/gdb.cp/rtti.h similarity index 100% rename from gdb/testsuite/gdb.c++/rtti.h rename to gdb/testsuite/gdb.cp/rtti.h diff --git a/gdb/testsuite/gdb.c++/rtti1.cc b/gdb/testsuite/gdb.cp/rtti1.cc similarity index 100% rename from gdb/testsuite/gdb.c++/rtti1.cc rename to gdb/testsuite/gdb.cp/rtti1.cc diff --git a/gdb/testsuite/gdb.c++/rtti2.cc b/gdb/testsuite/gdb.cp/rtti2.cc similarity index 100% rename from gdb/testsuite/gdb.c++/rtti2.cc rename to gdb/testsuite/gdb.cp/rtti2.cc diff --git a/gdb/testsuite/gdb.c++/templates.cc b/gdb/testsuite/gdb.cp/templates.cc similarity index 100% rename from gdb/testsuite/gdb.c++/templates.cc rename to gdb/testsuite/gdb.cp/templates.cc diff --git a/gdb/testsuite/gdb.c++/templates.exp b/gdb/testsuite/gdb.cp/templates.exp similarity index 100% rename from gdb/testsuite/gdb.c++/templates.exp rename to gdb/testsuite/gdb.cp/templates.exp diff --git a/gdb/testsuite/gdb.c++/try_catch.cc b/gdb/testsuite/gdb.cp/try_catch.cc similarity index 100% rename from gdb/testsuite/gdb.c++/try_catch.cc rename to gdb/testsuite/gdb.cp/try_catch.cc diff --git a/gdb/testsuite/gdb.c++/try_catch.exp b/gdb/testsuite/gdb.cp/try_catch.exp similarity index 100% rename from gdb/testsuite/gdb.c++/try_catch.exp rename to gdb/testsuite/gdb.cp/try_catch.exp diff --git a/gdb/testsuite/gdb.c++/userdef.cc b/gdb/testsuite/gdb.cp/userdef.cc similarity index 100% rename from gdb/testsuite/gdb.c++/userdef.cc rename to gdb/testsuite/gdb.cp/userdef.cc diff --git a/gdb/testsuite/gdb.c++/userdef.exp b/gdb/testsuite/gdb.cp/userdef.exp similarity index 100% rename from gdb/testsuite/gdb.c++/userdef.exp rename to gdb/testsuite/gdb.cp/userdef.exp diff --git a/gdb/testsuite/gdb.c++/virtfunc.cc b/gdb/testsuite/gdb.cp/virtfunc.cc similarity index 98% rename from gdb/testsuite/gdb.c++/virtfunc.cc rename to gdb/testsuite/gdb.cp/virtfunc.cc index 883d502ea1..005de9d0ea 100644 --- a/gdb/testsuite/gdb.c++/virtfunc.cc +++ b/gdb/testsuite/gdb.cp/virtfunc.cc @@ -170,7 +170,7 @@ extern "C" { }; #endif -main() +int main() { #ifdef usestubs set_debug_traps(); @@ -182,6 +182,8 @@ main() e.vb = 11; test_calls(); + return 0; + } int A::f() {return 1;} diff --git a/gdb/testsuite/gdb.c++/virtfunc.exp b/gdb/testsuite/gdb.cp/virtfunc.exp similarity index 100% rename from gdb/testsuite/gdb.c++/virtfunc.exp rename to gdb/testsuite/gdb.cp/virtfunc.exp -- 2.11.0