OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [testsuite/] [gdb.c++/] [virtfunc.exp] - Diff between revs 107 and 1765

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 107 Rev 1765
# Copyright (C) 1992, 1994, 1997, 1999 Free Software Foundation, Inc.
# Copyright (C) 1992, 1994, 1997, 1999 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# (at your option) any later version.
#
#
# This program is distributed in the hope that it will be useful,
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# Please email any bugs, comments, and/or additions to this file to:
# bug-gdb@prep.ai.mit.edu
# bug-gdb@prep.ai.mit.edu
# This file was written by Fred Fish. (fnf@cygnus.com)
# This file was written by Fred Fish. (fnf@cygnus.com)
set ws "\[\r\n\t \]+"
set ws "\[\r\n\t \]+"
set nl "\[\r\n\]+"
set nl "\[\r\n\]+"
if $tracelevel then {
if $tracelevel then {
        strace $tracelevel
        strace $tracelevel
}
}
if { [skip_cplus_tests] } { continue }
if { [skip_cplus_tests] } { continue }
set testfile "virtfunc"
set testfile "virtfunc"
set srcfile ${testfile}.cc
set srcfile ${testfile}.cc
set binfile ${objdir}/${subdir}/${testfile}
set binfile ${objdir}/${subdir}/${testfile}
if [get_compiler_info ${binfile} "c++"] {
if [get_compiler_info ${binfile} "c++"] {
    return -1
    return -1
}
}
source ${binfile}.ci
source ${binfile}.ci
set src "${srcdir}/${subdir}/${srcfile}"
set src "${srcdir}/${subdir}/${srcfile}"
if  { [gdb_compile "${src}" "${binfile}" executable {c++ debug}] != "" } {
if  { [gdb_compile "${src}" "${binfile}" executable {c++ debug}] != "" } {
     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
}
proc gdb_virtfunc_init {} {
proc gdb_virtfunc_init {} {
    global srcdir subdir binfile
    global srcdir subdir binfile
    global gdb_prompt
    global gdb_prompt
    gdb_reinitialize_dir $srcdir/$subdir
    gdb_reinitialize_dir $srcdir/$subdir
    gdb_load $binfile
    gdb_load $binfile
    send_gdb "set language c++\n"
    send_gdb "set language c++\n"
    gdb_expect -re "$gdb_prompt $"
    gdb_expect -re "$gdb_prompt $"
    send_gdb "set width 0\n"
    send_gdb "set width 0\n"
    gdb_expect -re "$gdb_prompt $"
    gdb_expect -re "$gdb_prompt $"
}
}
proc gdb_virtfunc_restart {} {
proc gdb_virtfunc_restart {} {
    gdb_exit;
    gdb_exit;
    gdb_start;
    gdb_start;
    gdb_virtfunc_init;
    gdb_virtfunc_init;
    runto 'test_calls(void)';
    runto 'test_calls(void)';
}
}
#
#
#  Test printing of the types of various classes.
#  Test printing of the types of various classes.
#
#
proc test_ptype_of_classes {} {
proc test_ptype_of_classes {} {
    global gdb_prompt
    global gdb_prompt
    global ws
    global ws
    global nl
    global nl
    # This used to be a fail if it printed "struct" not "class".  But
    # This used to be a fail if it printed "struct" not "class".  But
    # since this struct doesn't use any special C++ features, it is
    # since this struct doesn't use any special C++ features, it is
    # considered right for GDB to print it as "struct".
    # considered right for GDB to print it as "struct".
    send_gdb "ptype VA\n"
    send_gdb "ptype VA\n"
    gdb_expect {
    gdb_expect {
        -re "type = (struct|class) VA \{(${ws}public:|)${ws}int va;${ws}VA & operator=\\(VA const &\\);${ws}VA\\(VA const &\\);${ws}VA\\(void\\);${ws}\}.*$gdb_prompt $" {
        -re "type = (struct|class) VA \{(${ws}public:|)${ws}int va;${ws}VA & operator=\\(VA const &\\);${ws}VA\\(VA const &\\);${ws}VA\\(void\\);${ws}\}.*$gdb_prompt $" {
            pass "ptype VA"
            pass "ptype VA"
        }
        }
        -re "type = (struct|class) VA \{(${ws}public:|)${ws}int va;((${ws}VA & operator=\\(VA const &\\);)|(${ws}VA\\(VA const &\\);)|(${ws}VA\\(void\\);))*${ws}\}.*$gdb_prompt $" {
        -re "type = (struct|class) VA \{(${ws}public:|)${ws}int va;((${ws}VA & operator=\\(VA const &\\);)|(${ws}VA\\(VA const &\\);)|(${ws}VA\\(void\\);))*${ws}\}.*$gdb_prompt $" {
            pass "ptype VA (obsolescent gcc or gdb)"
            pass "ptype VA (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype VA"
            fail "ptype VA"
        }
        }
        timeout {
        timeout {
            fail "ptype VA (timeout)"
            fail "ptype VA (timeout)"
        }
        }
    }
    }
    send_gdb "ptype VB\n"
    send_gdb "ptype VB\n"
    gdb_expect {
    gdb_expect {
        -re "type = class VB \{${ws}public:${ws}int vb;${ws}VB & operator=\\(VB const &\\);${ws}VB\\(VB const &\\);${ws}VB\\(void\\);${ws}int fvb\\(void\\);${ws}virtual int vvb\\(void\\);${ws}\}.*$gdb_prompt $" {
        -re "type = class VB \{${ws}public:${ws}int vb;${ws}VB & operator=\\(VB const &\\);${ws}VB\\(VB const &\\);${ws}VB\\(void\\);${ws}int fvb\\(void\\);${ws}virtual int vvb\\(void\\);${ws}\}.*$gdb_prompt $" {
            pass "ptype VB"
            pass "ptype VB"
        }
        }
        -re "type = class VB \{${ws}public:${ws}int vb;${ws}int fvb \\(void\\);${ws}virtual int vvb \\(void\\);${ws}\}.*$gdb_prompt $" {
        -re "type = class VB \{${ws}public:${ws}int vb;${ws}int fvb \\(void\\);${ws}virtual int vvb \\(void\\);${ws}\}.*$gdb_prompt $" {
            pass "ptype VB (aCC)"
            pass "ptype VB (aCC)"
        }
        }
        -re "type = class VB \{${ws}public:${ws}int vb;((${ws}VB & operator=\\(VB const &\\);)|(${ws}VB\\(VB const &\\);)|(${ws}VB\\(void\\);)|(${ws}int fvb\\(void\\);)|(${ws}virtual int vvb\\(void\\);))*${ws}\}.*$gdb_prompt $" {
        -re "type = class VB \{${ws}public:${ws}int vb;((${ws}VB & operator=\\(VB const &\\);)|(${ws}VB\\(VB const &\\);)|(${ws}VB\\(void\\);)|(${ws}int fvb\\(void\\);)|(${ws}virtual int vvb\\(void\\);))*${ws}\}.*$gdb_prompt $" {
            pass "ptype VB (obsolescent gcc or gdb)"
            pass "ptype VB (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype VB"
            fail "ptype VB"
        }
        }
        timeout {
        timeout {
            fail "ptype VB (timeout)"
            fail "ptype VB (timeout)"
        }
        }
    }
    }
    send_gdb "ptype V\n"
    send_gdb "ptype V\n"
    gdb_expect {
    gdb_expect {
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const &\\);${ws}V\\(V const &\\);${ws}V\\(void\\);${ws}int f\\(void\\);${ws}virtual int vv\\(void\\);${ws}\}$nl$gdb_prompt $" {
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const &\\);${ws}V\\(V const &\\);${ws}V\\(void\\);${ws}int f\\(void\\);${ws}virtual int vv\\(void\\);${ws}\}$nl$gdb_prompt $" {
            pass "ptype V"
            pass "ptype V"
        }
        }
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\(void\\);${ws}virtual int vv \\(void\\);${ws}\}$nl$gdb_prompt $" {
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\(void\\);${ws}virtual int vv \\(void\\);${ws}\}$nl$gdb_prompt $" {
            pass "ptype V (aCC)"
            pass "ptype V (aCC)"
        }
        }
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const &\\);)|(${ws}V\\(V const &\\);)|(${ws}V\\(void\\);)|(${ws}int f\\(void\\);)|(${ws}virtual int vv\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const &\\);)|(${ws}V\\(V const &\\);)|(${ws}V\\(void\\);)|(${ws}int f\\(void\\);)|(${ws}virtual int vv\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
            pass "ptype V (obsolescent gcc or gdb)"
            pass "ptype V (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype V"
            fail "ptype V"
        }
        }
        timeout {
        timeout {
            fail "ptype V (timeout)"
            fail "ptype V (timeout)"
        }
        }
    }
    }
    # The format of a g++ virtual base pointer.
    # The format of a g++ virtual base pointer.
    set vbptr "(_vb\[$.\]|__vb_)\[0-9\]?"
    set vbptr "(_vb\[$.\]|__vb_)\[0-9\]?"
    send_gdb "ptype A\n"
    send_gdb "ptype A\n"
    gdb_expect {
    gdb_expect {
        -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:${ws}A & operator=\\(A const &\\);${ws}A\\(int, A const &\\);${ws}A\\(int\\);${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
        -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:${ws}A & operator=\\(A const &\\);${ws}A\\(int, A const &\\);${ws}A\\(int\\);${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
            pass "ptype A"
            pass "ptype A"
        }
        }
        -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
        -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
            pass "ptype A (aCC)"
            pass "ptype A (aCC)"
        }
        }
        -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const &\\);)|(${ws}A\\(int, A const &\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
        -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const &\\);)|(${ws}A\\(int, A const &\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
            pass "ptype A (obsolescent gcc or gdb)"
            pass "ptype A (obsolescent gcc or gdb)"
        }
        }
        -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}FOO;${ws}int a;${ws}public:${ws}virtual int f.void.;${ws}\}$nl$gdb_prompt $" {
        -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}FOO;${ws}int a;${ws}public:${ws}virtual int f.void.;${ws}\}$nl$gdb_prompt $" {
            # This happens because the type is defined only after it is
            # This happens because the type is defined only after it is
            # too late.
            # too late.
            fail "ptype A (known failure with gcc cygnus-2.4.5-930417)"
            fail "ptype A (known failure with gcc cygnus-2.4.5-930417)"
            # Many of the rest of these tests have the same problem.
            # Many of the rest of these tests have the same problem.
            return 0
            return 0
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype A"
            fail "ptype A"
        }
        }
        timeout {
        timeout {
            fail "ptype A (timeout)"
            fail "ptype A (timeout)"
        }
        }
    }
    }
    send_gdb "ptype B\n"
    send_gdb "ptype B\n"
    gdb_expect {
    gdb_expect {
        -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}B & operator=\\(B const &\\);${ws}B\\(int, B const &\\);${ws}B\\(int\\);${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
        -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}B & operator=\\(B const &\\);${ws}B\\(int, B const &\\);${ws}B\\(int\\);${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
            pass "ptype B"
            pass "ptype B"
        }
        }
        -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}virtual int f \\(void\\);${ws}\}$nl$gdb_prompt $" {
        -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}virtual int f \\(void\\);${ws}\}$nl$gdb_prompt $" {
            pass "ptype B (aCC)"
            pass "ptype B (aCC)"
        }
        }
        -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:((${ws}B & operator=\\(B const &\\);)|(${ws}B\\(int, B const &\\);)|(${ws}B\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
        -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:((${ws}B & operator=\\(B const &\\);)|(${ws}B\\(int, B const &\\);)|(${ws}B\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
            pass "ptype B (obsolescent gcc or gdb)"
            pass "ptype B (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype B"
            fail "ptype B"
        }
        }
        timeout {
        timeout {
            fail "ptype B (timeout)"
            fail "ptype B (timeout)"
        }
        }
    }
    }
    send_gdb "ptype C\n"
    send_gdb "ptype C\n"
    gdb_expect {
    gdb_expect {
        -re "type = class C : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int c;${ws}C & operator=\\(C const &\\);${ws}C\\(int, C const &\\);${ws}C\\(int\\);${ws}\}$nl$gdb_prompt $" {
        -re "type = class C : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int c;${ws}C & operator=\\(C const &\\);${ws}C\\(int, C const &\\);${ws}C\\(int\\);${ws}\}$nl$gdb_prompt $" {
            pass "ptype C"
            pass "ptype C"
        }
        }
        -re "type = class C : public virtual V \{${ws}public:${ws}int c;${ws}\}$nl$gdb_prompt $" {
        -re "type = class C : public virtual V \{${ws}public:${ws}int c;${ws}\}$nl$gdb_prompt $" {
            pass "ptype C (aCC)"
            pass "ptype C (aCC)"
        }
        }
        -re "type = class C : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int c;((${ws}C & operator=\\(C const &\\);)|(${ws}C\\(int, C const &\\);)|(${ws}C\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
        -re "type = class C : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int c;((${ws}C & operator=\\(C const &\\);)|(${ws}C\\(int, C const &\\);)|(${ws}C\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
            pass "ptype C (obsolescent gcc or gdb)"
            pass "ptype C (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype C"
            fail "ptype C"
        }
        }
        timeout {
        timeout {
            fail "ptype C (timeout)"
            fail "ptype C (timeout)"
        }
        }
    }
    }
    send_gdb "ptype AD\n"
    send_gdb "ptype AD\n"
    gdb_expect {
    gdb_expect {
        -re "type = class AD \{${ws}public:${ws}AD & operator=\\(AD const &\\);${ws}AD\\(AD const &\\);${ws}AD\\(void\\);${ws}virtual int vg\\(void\\);${ws}\}$nl$gdb_prompt $" {
        -re "type = class AD \{${ws}public:${ws}AD & operator=\\(AD const &\\);${ws}AD\\(AD const &\\);${ws}AD\\(void\\);${ws}virtual int vg\\(void\\);${ws}\}$nl$gdb_prompt $" {
            pass "ptype AD"
            pass "ptype AD"
        }
        }
        -re "type = class AD \{${ws}public:${ws}virtual int vg \\(void\\);${ws}\}$nl$gdb_prompt $" {
        -re "type = class AD \{${ws}public:${ws}virtual int vg \\(void\\);${ws}\}$nl$gdb_prompt $" {
            pass "ptype AD (aCC)"
            pass "ptype AD (aCC)"
        }
        }
        -re "type = class AD \{${ws}public:((${ws}AD & operator=\\(AD const &\\);)|(${ws}AD\\(AD const &\\);)|(${ws}AD\\(void\\);)|(${ws}virtual int vg\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
        -re "type = class AD \{${ws}public:((${ws}AD & operator=\\(AD const &\\);)|(${ws}AD\\(AD const &\\);)|(${ws}AD\\(void\\);)|(${ws}virtual int vg\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
            pass "ptype AD (obsolescent gcc or gdb)"
            pass "ptype AD (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype AD"
            fail "ptype AD"
        }
        }
        timeout {
        timeout {
            fail "ptype AD (timeout)"
            fail "ptype AD (timeout)"
        }
        }
    }
    }
    send_gdb "ptype D\n"
    send_gdb "ptype D\n"
    gdb_expect {
    gdb_expect {
        -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
        -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
            pass "ptype D"
            pass "ptype D"
        }
        }
        -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
        -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
            pass "ptype D (aCC)"
            pass "ptype D (aCC)"
        }
        }
        -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
        -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
            pass "ptype D (obsolescent gcc or gdb)"
            pass "ptype D (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype D"
            fail "ptype D"
        }
        }
        timeout {
        timeout {
            fail "ptype D (timeout)"
            fail "ptype D (timeout)"
        }
        }
    }
    }
    send_gdb "ptype E\n"
    send_gdb "ptype E\n"
    gdb_expect {
    gdb_expect {
        -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}E & operator=\\(E const &\\);${ws}E\\(int, E const &\\);${ws}E\\(int\\);${ws}virtual int f\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vv\\(void\\);${ws}\}$nl$gdb_prompt $" {
        -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}E & operator=\\(E const &\\);${ws}E\\(int, E const &\\);${ws}E\\(int\\);${ws}virtual int f\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vv\\(void\\);${ws}\}$nl$gdb_prompt $" {
            pass "ptype E"
            pass "ptype E"
        }
        }
        -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}virtual int f \\(void\\);${ws}virtual int vg \\(void\\);${ws}virtual int vv \\(void\\);${ws}\}$nl$gdb_prompt $" {
        -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}virtual int f \\(void\\);${ws}virtual int vg \\(void\\);${ws}virtual int vv \\(void\\);${ws}\}$nl$gdb_prompt $" {
            pass "ptype E (aCC)"
            pass "ptype E (aCC)"
        }
        }
        -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;((${ws}E & operator=\\(E const &\\);)|(${ws}E\\(int, E const &\\);)|(${ws}E\\(int\\);)|(${ws}virtual int f\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vv\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
        -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;((${ws}E & operator=\\(E const &\\);)|(${ws}E\\(int, E const &\\);)|(${ws}E\\(int\\);)|(${ws}virtual int f\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vv\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
            pass "ptype E (obsolescent gcc or gdb)"
            pass "ptype E (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype E"
            fail "ptype E"
        }
        }
        timeout {
        timeout {
            fail "ptype E (timeout)"
            fail "ptype E (timeout)"
        }
        }
    }
    }
    send_gdb "ptype dd\n"
    send_gdb "ptype dd\n"
    gdb_expect {
    gdb_expect {
        -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
        -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
            pass "ptype dd"
            pass "ptype dd"
        }
        }
        -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
        -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
            pass "ptype dd (aCC)"
            pass "ptype dd (aCC)"
        }
        }
        -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
        -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
            pass "ptype dd (obsolescent gcc or gdb)"
            pass "ptype dd (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype dd"
            fail "ptype dd"
        }
        }
        timeout {
        timeout {
            fail "ptype dd (timeout)"
            fail "ptype dd (timeout)"
        }
        }
    }
    }
    send_gdb "ptype ppd\n"
    send_gdb "ptype ppd\n"
    gdb_expect {
    gdb_expect {
        -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype ppd"
            pass "ptype ppd"
        }
        }
        -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype ppd (aCC)"
            pass "ptype ppd (aCC)"
        }
        }
        -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype ppd (obsolescent gcc or gdb)"
            pass "ptype ppd (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype ppd"
            fail "ptype ppd"
        }
        }
        timeout {
        timeout {
            fail "ptype ppd (timeout)"
            fail "ptype ppd (timeout)"
        }
        }
    }
    }
    send_gdb "ptype pAd\n"
    send_gdb "ptype pAd\n"
    gdb_expect {
    gdb_expect {
        -re "type = class AD \{${ws}public:${ws}AD & operator=\\(AD const &\\);${ws}AD\\(AD const &\\);${ws}AD\\(void\\);${ws}virtual int vg\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class AD \{${ws}public:${ws}AD & operator=\\(AD const &\\);${ws}AD\\(AD const &\\);${ws}AD\\(void\\);${ws}virtual int vg\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pAd"
            pass "ptype pAd"
        }
        }
        -re "type = class AD \{${ws}public:${ws}virtual int vg \\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class AD \{${ws}public:${ws}virtual int vg \\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pAd (aCC)"
            pass "ptype pAd (aCC)"
        }
        }
        -re "type = class AD \{${ws}public:((${ws}AD & operator=\\(AD const &\\);)|(${ws}AD\\(AD const &\\);)|(${ws}AD\\(void\\);)|(${ws}virtual int vg\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class AD \{${ws}public:((${ws}AD & operator=\\(AD const &\\);)|(${ws}AD\\(AD const &\\);)|(${ws}AD\\(void\\);)|(${ws}virtual int vg\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pAd (obsolescent gcc or gdb)"
            pass "ptype pAd (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype pAd"
            fail "ptype pAd"
        }
        }
        timeout {
        timeout {
            fail "ptype pAd (timeout)"
            fail "ptype pAd (timeout)"
        }
        }
    }
    }
    send_gdb "ptype a\n"
    send_gdb "ptype a\n"
    gdb_expect {
    gdb_expect {
        -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:${ws}A & operator=\\(A const &\\);${ws}A\\(int, A const &\\);${ws}A\\(int\\);${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
        -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:${ws}A & operator=\\(A const &\\);${ws}A\\(int, A const &\\);${ws}A\\(int\\);${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
            pass "ptype a"
            pass "ptype a"
        }
        }
        -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
        -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
            pass "ptype a (aCC)"
            pass "ptype a (aCC)"
        }
        }
        -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const &\\);)|(${ws}A\\(int, A const &\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
        -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const &\\);)|(${ws}A\\(int, A const &\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
            pass "ptype a (obsolescent gcc or gdb)"
            pass "ptype a (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype a"
            fail "ptype a"
        }
        }
        timeout {
        timeout {
            fail "ptype a (timeout)"
            fail "ptype a (timeout)"
        }
        }
    }
    }
    send_gdb "ptype b\n"
    send_gdb "ptype b\n"
    gdb_expect {
    gdb_expect {
        -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}B & operator=\\(B const &\\);${ws}B\\(int, B const &\\);${ws}B\\(int\\);${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
        -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}B & operator=\\(B const &\\);${ws}B\\(int, B const &\\);${ws}B\\(int\\);${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
            pass "ptype b"
            pass "ptype b"
        }
        }
        -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}virtual int f \\(void\\);${ws}\}$nl$gdb_prompt $" {
        -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}virtual int f \\(void\\);${ws}\}$nl$gdb_prompt $" {
            pass "ptype b (aCC)"
            pass "ptype b (aCC)"
        }
        }
        -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:((${ws}B & operator=\\(B const &\\);)|(${ws}B\\(int, B const &\\);)|(${ws}B\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
        -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:((${ws}B & operator=\\(B const &\\);)|(${ws}B\\(int, B const &\\);)|(${ws}B\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
            pass "ptype b (obsolescent gcc or gdb)"
            pass "ptype b (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype b"
            fail "ptype b"
        }
        }
        timeout {
        timeout {
            fail "ptype b (timeout)"
            fail "ptype b (timeout)"
        }
        }
    }
    }
    send_gdb "ptype c\n"
    send_gdb "ptype c\n"
    gdb_expect {
    gdb_expect {
        -re "type = class C : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int c;${ws}C & operator=\\(C const &\\);${ws}C\\(int, C const &\\);${ws}C\\(int\\);${ws}\}$nl$gdb_prompt $" {
        -re "type = class C : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int c;${ws}C & operator=\\(C const &\\);${ws}C\\(int, C const &\\);${ws}C\\(int\\);${ws}\}$nl$gdb_prompt $" {
            pass "ptype c"
            pass "ptype c"
        }
        }
        -re "type = class C : public virtual V \{${ws}public:${ws}int c;${ws}\}$nl$gdb_prompt $" {
        -re "type = class C : public virtual V \{${ws}public:${ws}int c;${ws}\}$nl$gdb_prompt $" {
            pass "ptype c (aCC)"
            pass "ptype c (aCC)"
        }
        }
        -re "type = class C : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int c;((${ws}C & operator=\\(C const &\\);)|(${ws}C\\(int, C const &\\);)|(${ws}C\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
        -re "type = class C : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int c;((${ws}C & operator=\\(C const &\\);)|(${ws}C\\(int, C const &\\);)|(${ws}C\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
            pass "ptype c (obsolescent gcc or gdb)"
            pass "ptype c (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype c"
            fail "ptype c"
        }
        }
        timeout {
        timeout {
            fail "ptype c (timeout)"
            fail "ptype c (timeout)"
        }
        }
    }
    }
    send_gdb "ptype d\n"
    send_gdb "ptype d\n"
    gdb_expect {
    gdb_expect {
        -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
        -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
            pass "ptype d"
            pass "ptype d"
        }
        }
        -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
        -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
            pass "ptype d (aCC)"
            pass "ptype d (aCC)"
        }
        }
        -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
        -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
            pass "ptype d (obsolescent gcc or gdb)"
            pass "ptype d (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype d"
            fail "ptype d"
        }
        }
        timeout {
        timeout {
            fail "ptype d (timeout)"
            fail "ptype d (timeout)"
        }
        }
    }
    }
    send_gdb "ptype e\n"
    send_gdb "ptype e\n"
    gdb_expect {
    gdb_expect {
        -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}E & operator=\\(E const &\\);${ws}E\\(int, E const &\\);${ws}E\\(int\\);${ws}virtual int f\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vv\\(void\\);${ws}\}$nl$gdb_prompt $" {
        -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}E & operator=\\(E const &\\);${ws}E\\(int, E const &\\);${ws}E\\(int\\);${ws}virtual int f\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vv\\(void\\);${ws}\}$nl$gdb_prompt $" {
            pass "ptype e"
            pass "ptype e"
        }
        }
        -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}virtual int f \\(void\\);${ws}virtual int vg \\(void\\);${ws}virtual int vv \\(void\\);${ws}\}$nl$gdb_prompt $" {
        -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}virtual int f \\(void\\);${ws}virtual int vg \\(void\\);${ws}virtual int vv \\(void\\);${ws}\}$nl$gdb_prompt $" {
            pass "ptype e (aCC)"
            pass "ptype e (aCC)"
        }
        }
        -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;((${ws}E & operator=\\(E const &\\);)|(${ws}E\\(int, E const &\\);)|(${ws}E\\(int\\);)|(${ws}virtual int f\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vv\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
        -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;((${ws}E & operator=\\(E const &\\);)|(${ws}E\\(int, E const &\\);)|(${ws}E\\(int\\);)|(${ws}virtual int f\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vv\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
            pass "ptype e (obsolescent gcc or gdb)"
            pass "ptype e (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype e"
            fail "ptype e"
        }
        }
        timeout {
        timeout {
            fail "ptype e (timeout)"
            fail "ptype e (timeout)"
        }
        }
    }
    }
    send_gdb "ptype v\n"
    send_gdb "ptype v\n"
    gdb_expect {
    gdb_expect {
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const &\\);${ws}V\\(V const &\\);${ws}V\\(void\\);${ws}int f\\(void\\);${ws}virtual int vv\\(void\\);${ws}\}$nl$gdb_prompt $" {
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const &\\);${ws}V\\(V const &\\);${ws}V\\(void\\);${ws}int f\\(void\\);${ws}virtual int vv\\(void\\);${ws}\}$nl$gdb_prompt $" {
            pass "ptype v"
            pass "ptype v"
        }
        }
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\(void\\);${ws}virtual int vv \\(void\\);${ws}\}$nl$gdb_prompt $" {
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\(void\\);${ws}virtual int vv \\(void\\);${ws}\}$nl$gdb_prompt $" {
            pass "ptype v (aCC)"
            pass "ptype v (aCC)"
        }
        }
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const &\\);)|(${ws}V\\(V const &\\);)|(${ws}V\\(void\\);)|(${ws}int f\\(void\\);)|(${ws}virtual int vv\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const &\\);)|(${ws}V\\(V const &\\);)|(${ws}V\\(void\\);)|(${ws}int f\\(void\\);)|(${ws}virtual int vv\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
            pass "ptype v (obsolescent gcc or gdb)"
            pass "ptype v (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype v"
            fail "ptype v"
        }
        }
        timeout {
        timeout {
            fail "ptype v (timeout)"
            fail "ptype v (timeout)"
        }
        }
    }
    }
    send_gdb "ptype vb\n"
    send_gdb "ptype vb\n"
    gdb_expect {
    gdb_expect {
        -re "type = class VB \{${ws}public:${ws}int vb;${ws}VB & operator=\\(VB const &\\);${ws}VB\\(VB const &\\);${ws}VB\\(void\\);${ws}int fvb\\(void\\);${ws}virtual int vvb\\(void\\);${ws}\}$nl$gdb_prompt $" {
        -re "type = class VB \{${ws}public:${ws}int vb;${ws}VB & operator=\\(VB const &\\);${ws}VB\\(VB const &\\);${ws}VB\\(void\\);${ws}int fvb\\(void\\);${ws}virtual int vvb\\(void\\);${ws}\}$nl$gdb_prompt $" {
            pass "ptype vb"
            pass "ptype vb"
        }
        }
        -re "type = class VB \{${ws}public:${ws}int vb;${ws}int fvb \\(void\\);${ws}virtual int vvb \\(void\\);${ws}\}$nl$gdb_prompt $" {
        -re "type = class VB \{${ws}public:${ws}int vb;${ws}int fvb \\(void\\);${ws}virtual int vvb \\(void\\);${ws}\}$nl$gdb_prompt $" {
            pass "ptype vb (aCC)"
            pass "ptype vb (aCC)"
        }
        }
        -re "type = class VB \{${ws}public:${ws}int vb;((${ws}VB & operator=\\(VB const &\\);)|(${ws}VB\\(VB const &\\);)|(${ws}VB\\(void\\);)|(${ws}int fvb\\(void\\);)|(${ws}virtual int vvb\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
        -re "type = class VB \{${ws}public:${ws}int vb;((${ws}VB & operator=\\(VB const &\\);)|(${ws}VB\\(VB const &\\);)|(${ws}VB\\(void\\);)|(${ws}int fvb\\(void\\);)|(${ws}virtual int vvb\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
            pass "ptype vb (obsolescent gcc or gdb)"
            pass "ptype vb (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype vb"
            fail "ptype vb"
        }
        }
        timeout {
        timeout {
            fail "ptype vb (timeout)"
            fail "ptype vb (timeout)"
        }
        }
    }
    }
    send_gdb "ptype pAa\n"
    send_gdb "ptype pAa\n"
    gdb_expect {
    gdb_expect {
        -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:${ws}A & operator=\\(A const &\\);${ws}A\\(int, A const &\\);${ws}A\\(int\\);${ws}virtual int f\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:${ws}A & operator=\\(A const &\\);${ws}A\\(int, A const &\\);${ws}A\\(int\\);${ws}virtual int f\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pAa"
            pass "ptype pAa"
        }
        }
        -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pAa (aCC)"
            pass "ptype pAa (aCC)"
        }
        }
        -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const &\\);)|(${ws}A\\(int, A const &\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const &\\);)|(${ws}A\\(int, A const &\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pAa (obsolescent gcc or gdb)"
            pass "ptype pAa (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype pAa"
            fail "ptype pAa"
        }
        }
        timeout {
        timeout {
            fail "ptype pAa (timeout)"
            fail "ptype pAa (timeout)"
        }
        }
    }
    }
    send_gdb "ptype pAe\n"
    send_gdb "ptype pAe\n"
    gdb_expect {
    gdb_expect {
        -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:${ws}A & operator=\\(A const &\\);${ws}A\\(int, A const &\\);${ws}A\\(int\\);${ws}virtual int f\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:${ws}A & operator=\\(A const &\\);${ws}A\\(int, A const &\\);${ws}A\\(int\\);${ws}virtual int f\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pAe"
            pass "ptype pAe"
        }
        }
        -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pAe (aCC)"
            pass "ptype pAe (aCC)"
        }
        }
        -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const &\\);)|(${ws}A\\(int, A const &\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const &\\);)|(${ws}A\\(int, A const &\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pAe (obsolescent gcc or gdb)"
            pass "ptype pAe (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype pAe"
            fail "ptype pAe"
        }
        }
        timeout {
        timeout {
            fail "ptype pAe (timeout)"
            fail "ptype pAe (timeout)"
        }
        }
    }
    }
    send_gdb "ptype pBe\n"
    send_gdb "ptype pBe\n"
    gdb_expect {
    gdb_expect {
        -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}B & operator=\\(B const &\\);${ws}B\\(int, B const &\\);${ws}B\\(int\\);${ws}virtual int f\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}B & operator=\\(B const &\\);${ws}B\\(int, B const &\\);${ws}B\\(int\\);${ws}virtual int f\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pBe"
            pass "ptype pBe"
        }
        }
        -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}virtual int f \\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}virtual int f \\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pBe (aCC)"
            pass "ptype pBe (aCC)"
        }
        }
        -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:((${ws}B & operator=\\(B const &\\);)|(${ws}B\\(int, B const &\\);)|(${ws}B\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:((${ws}B & operator=\\(B const &\\);)|(${ws}B\\(int, B const &\\);)|(${ws}B\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pBe (obsolescent gcc or gdb)"
            pass "ptype pBe (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype pBe"
            fail "ptype pBe"
        }
        }
        timeout {
        timeout {
            fail "ptype pBe (timeout)"
            fail "ptype pBe (timeout)"
        }
        }
    }
    }
    send_gdb "ptype pDd\n"
    send_gdb "ptype pDd\n"
    gdb_expect {
    gdb_expect {
        -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pDd"
            pass "ptype pDd"
        }
        }
        -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pDd (aCC)"
            pass "ptype pDd (aCC)"
        }
        }
        -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pDd (obsolescent gcc or gdb)"
            pass "ptype pDd (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype pDd"
            fail "ptype pDd"
        }
        }
        timeout {
        timeout {
            fail "ptype pDd (timeout)"
            fail "ptype pDd (timeout)"
        }
        }
    }
    }
    send_gdb "ptype pDe\n"
    send_gdb "ptype pDe\n"
    gdb_expect {
    gdb_expect {
        -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pDe"
            pass "ptype pDe"
        }
        }
        -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pDe (aCC)"
            pass "ptype pDe (aCC)"
        }
        }
        -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pDe (obsolescent gcc or gdb)"
            pass "ptype pDe (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype pDe"
            fail "ptype pDe"
        }
        }
        timeout {
        timeout {
            fail "ptype pDe (timeout)"
            fail "ptype pDe (timeout)"
        }
        }
    }
    }
    send_gdb "ptype pVa\n"
    send_gdb "ptype pVa\n"
    gdb_expect {
    gdb_expect {
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const &\\);${ws}V\\(V const &\\);${ws}V\\(void\\);${ws}int f\\(void\\);${ws}virtual int vv\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const &\\);${ws}V\\(V const &\\);${ws}V\\(void\\);${ws}int f\\(void\\);${ws}virtual int vv\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pVa"
            pass "ptype pVa"
        }
        }
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\(void\\);${ws}virtual int vv \\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\(void\\);${ws}virtual int vv \\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pVa (aCC)"
            pass "ptype pVa (aCC)"
        }
        }
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const &\\);)|(${ws}V\\(V const &\\);)|(${ws}V\\(void\\);)|(${ws}int f\\(void\\);)|(${ws}virtual int vv\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const &\\);)|(${ws}V\\(V const &\\);)|(${ws}V\\(void\\);)|(${ws}int f\\(void\\);)|(${ws}virtual int vv\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pVa (obsolescent gcc or gdb)"
            pass "ptype pVa (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype pVa"
            fail "ptype pVa"
        }
        }
        timeout {
        timeout {
            fail "ptype pVa (timeout)"
            fail "ptype pVa (timeout)"
        }
        }
    }
    }
    send_gdb "ptype pVv\n"
    send_gdb "ptype pVv\n"
    gdb_expect {
    gdb_expect {
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const &\\);${ws}V\\(V const &\\);${ws}V\\(void\\);${ws}int f\\(void\\);${ws}virtual int vv\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const &\\);${ws}V\\(V const &\\);${ws}V\\(void\\);${ws}int f\\(void\\);${ws}virtual int vv\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pVv"
            pass "ptype pVv"
        }
        }
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\(void\\);${ws}virtual int vv \\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\(void\\);${ws}virtual int vv \\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pVv (aCC)"
            pass "ptype pVv (aCC)"
        }
        }
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const &\\);)|(${ws}V\\(V const &\\);)|(${ws}V\\(void\\);)|(${ws}int f\\(void\\);)|(${ws}virtual int vv\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const &\\);)|(${ws}V\\(V const &\\);)|(${ws}V\\(void\\);)|(${ws}int f\\(void\\);)|(${ws}virtual int vv\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pVv (obsolescent gcc or gdb)"
            pass "ptype pVv (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype pVv"
            fail "ptype pVv"
        }
        }
        timeout {
        timeout {
            fail "ptype pVv (timeout)"
            fail "ptype pVv (timeout)"
        }
        }
    }
    }
    send_gdb "ptype pVe\n"
    send_gdb "ptype pVe\n"
    gdb_expect {
    gdb_expect {
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const &\\);${ws}V\\(V const &\\);${ws}V\\(void\\);${ws}int f\\(void\\);${ws}virtual int vv\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const &\\);${ws}V\\(V const &\\);${ws}V\\(void\\);${ws}int f\\(void\\);${ws}virtual int vv\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pVe"
            pass "ptype pVe"
        }
        }
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\(void\\);${ws}virtual int vv \\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\(void\\);${ws}virtual int vv \\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pVe (aCC)"
            pass "ptype pVe (aCC)"
        }
        }
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const &\\);)|(${ws}V\\(V const &\\);)|(${ws}V\\(void\\);)|(${ws}int f\\(void\\);)|(${ws}virtual int vv\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const &\\);)|(${ws}V\\(V const &\\);)|(${ws}V\\(void\\);)|(${ws}int f\\(void\\);)|(${ws}virtual int vv\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pVe (obsolescent gcc or gdb)"
            pass "ptype pVe (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype pVe"
            fail "ptype pVe"
        }
        }
        timeout {
        timeout {
            fail "ptype pVe (timeout)"
            fail "ptype pVe (timeout)"
        }
        }
    }
    }
    send_gdb "ptype pVd\n"
    send_gdb "ptype pVd\n"
    gdb_expect {
    gdb_expect {
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const &\\);${ws}V\\(V const &\\);${ws}V\\(void\\);${ws}int f\\(void\\);${ws}virtual int vv\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const &\\);${ws}V\\(V const &\\);${ws}V\\(void\\);${ws}int f\\(void\\);${ws}virtual int vv\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pVd"
            pass "ptype pVd"
        }
        }
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\(void\\);${ws}virtual int vv \\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\(void\\);${ws}virtual int vv \\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pVd (aCC)"
            pass "ptype pVd (aCC)"
        }
        }
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const &\\);)|(${ws}V\\(V const &\\);)|(${ws}V\\(void\\);)|(${ws}int f\\(void\\);)|(${ws}virtual int vv\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const &\\);)|(${ws}V\\(V const &\\);)|(${ws}V\\(void\\);)|(${ws}int f\\(void\\);)|(${ws}virtual int vv\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pVd (obsolescent gcc or gdb)"
            pass "ptype pVd (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype pVd"
            fail "ptype pVd"
        }
        }
        timeout {
        timeout {
            fail "ptype pVd (timeout)"
            fail "ptype pVd (timeout)"
        }
        }
    }
    }
    send_gdb "ptype pADe\n"
    send_gdb "ptype pADe\n"
    gdb_expect {
    gdb_expect {
        -re "type = class AD \{${ws}public:${ws}AD & operator=\\(AD const &\\);${ws}AD\\(AD const &\\);${ws}AD\\(void\\);${ws}virtual int vg\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class AD \{${ws}public:${ws}AD & operator=\\(AD const &\\);${ws}AD\\(AD const &\\);${ws}AD\\(void\\);${ws}virtual int vg\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pADe"
            pass "ptype pADe"
        }
        }
        -re "type = class AD \{${ws}public:${ws}virtual int vg \\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class AD \{${ws}public:${ws}virtual int vg \\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pADe (aCC)"
            pass "ptype pADe (aCC)"
        }
        }
        -re "type = class AD \{${ws}public:((${ws}AD & operator=\\(AD const &\\);)|(${ws}AD\\(AD const &\\);)|(${ws}AD\\(void\\);)|(${ws}virtual int vg\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class AD \{${ws}public:((${ws}AD & operator=\\(AD const &\\);)|(${ws}AD\\(AD const &\\);)|(${ws}AD\\(void\\);)|(${ws}virtual int vg\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pADe (obsolescent gcc or gdb)"
            pass "ptype pADe (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype pADe"
            fail "ptype pADe"
        }
        }
        timeout {
        timeout {
            fail "ptype pADe (timeout)"
            fail "ptype pADe (timeout)"
        }
        }
    }
    }
    send_gdb "ptype pEe\n"
    send_gdb "ptype pEe\n"
    gdb_expect {
    gdb_expect {
        -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}E & operator=\\(E const &\\);${ws}E\\(int, E const &\\);${ws}E\\(int\\);${ws}virtual int f\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vv\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}E & operator=\\(E const &\\);${ws}E\\(int, E const &\\);${ws}E\\(int\\);${ws}virtual int f\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vv\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pEe"
            pass "ptype pEe"
        }
        }
        -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}virtual int f \\(void\\);${ws}virtual int vg \\(void\\);${ws}virtual int vv \\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}virtual int f \\(void\\);${ws}virtual int vg \\(void\\);${ws}virtual int vv \\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pEe (aCC)"
            pass "ptype pEe (aCC)"
        }
        }
        -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;((${ws}E & operator=\\(E const &\\);)|(${ws}E\\(int, E const &\\);)|(${ws}E\\(int\\);)|(${ws}virtual int f\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vv\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;((${ws}E & operator=\\(E const &\\);)|(${ws}E\\(int, E const &\\);)|(${ws}E\\(int\\);)|(${ws}virtual int f\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vv\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pEe (obsolescent gcc or gdb)"
            pass "ptype pEe (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype pEe"
            fail "ptype pEe"
        }
        }
        timeout {
        timeout {
            fail "ptype pEe (timeout)"
            fail "ptype pEe (timeout)"
        }
        }
    }
    }
    send_gdb "ptype pVB\n"
    send_gdb "ptype pVB\n"
    gdb_expect {
    gdb_expect {
        -re "type = class VB \{${ws}public:${ws}int vb;${ws}VB & operator=\\(VB const &\\);${ws}VB\\(VB const &\\);${ws}VB\\(void\\);${ws}int fvb\\(void\\);${ws}virtual int vvb\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class VB \{${ws}public:${ws}int vb;${ws}VB & operator=\\(VB const &\\);${ws}VB\\(VB const &\\);${ws}VB\\(void\\);${ws}int fvb\\(void\\);${ws}virtual int vvb\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pVB"
            pass "ptype pVB"
        }
        }
        -re "type = class VB \{${ws}public:${ws}int vb;${ws}int fvb \\(void\\);${ws}virtual int vvb \\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class VB \{${ws}public:${ws}int vb;${ws}int fvb \\(void\\);${ws}virtual int vvb \\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pVB (aCC)"
            pass "ptype pVB (aCC)"
        }
        }
        -re "type = class VB \{${ws}public:${ws}int vb;((${ws}VB & operator=\\(VB const &\\);)|(${ws}VB\\(VB const &\\);)|(${ws}VB\\(void\\);)|(${ws}int fvb\\(void\\);)|(${ws}virtual int vvb\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
        -re "type = class VB \{${ws}public:${ws}int vb;((${ws}VB & operator=\\(VB const &\\);)|(${ws}VB\\(VB const &\\);)|(${ws}VB\\(void\\);)|(${ws}int fvb\\(void\\);)|(${ws}virtual int vvb\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
            pass "ptype pVB (obsolescent gcc or gdb)"
            pass "ptype pVB (obsolescent gcc or gdb)"
        }
        }
        -re ".*$gdb_prompt $" {
        -re ".*$gdb_prompt $" {
            fail "ptype pVB"
            fail "ptype pVB"
        }
        }
        timeout {
        timeout {
            fail "ptype pVB (timeout)"
            fail "ptype pVB (timeout)"
        }
        }
    }
    }
}
}
#
#
#  Test calling of virtual functions.
#  Test calling of virtual functions.
#
#
proc test_virtual_calls {} {
proc test_virtual_calls {} {
    global gdb_prompt
    global gdb_prompt
    global GDB
    global GDB
    global nl
    global nl
    global gcc_compiled
    global gcc_compiled
    if [target_info exists gdb,cannot_call_functions] {
    if [target_info exists gdb,cannot_call_functions] {
        setup_xfail "*-*-*" 2416
        setup_xfail "*-*-*" 2416
        fail "This target can not call functions"
        fail "This target can not call functions"
        return 0
        return 0
    }
    }
    # FIXME: In fall 1998, GCC's virtual function type info was changed,
    # FIXME: In fall 1998, GCC's virtual function type info was changed,
    # which causes GDB to be unable to resolve these calls.  Until the
    # which causes GDB to be unable to resolve these calls.  Until the
    # problem is fixed, XFAIL these tests. -sts 1999-08-02
    # problem is fixed, XFAIL these tests. -sts 1999-08-02
    if {$gcc_compiled} then { setup_xfail "*-*-*" }
    if {$gcc_compiled} then { setup_xfail "*-*-*" }
    send_gdb "print pAe->f()\n"
    send_gdb "print pAe->f()\n"
    gdb_expect {
    gdb_expect {
        -re ".* = 20$nl$gdb_prompt $" { pass "print pAe->f()" }
        -re ".* = 20$nl$gdb_prompt $" { pass "print pAe->f()" }
        -re "Cannot invoke functions on this machine.*$gdb_prompt $" {
        -re "Cannot invoke functions on this machine.*$gdb_prompt $" {
            fail "print pAe->f() (cannot invoke functions, skipping virtual calls)"
            fail "print pAe->f() (cannot invoke functions, skipping virtual calls)"
            return 0
            return 0
        }
        }
        -re ".*Cannot access memory at address 0x8.*$gdb_prompt $" {
        -re ".*Cannot access memory at address 0x8.*$gdb_prompt $" {
            fail "print pAe->f() \
            fail "print pAe->f() \
(known failure with gcc cygnus-2.4.5-930417, skipping virtual calls)"
(known failure with gcc cygnus-2.4.5-930417, skipping virtual calls)"
            return 0
            return 0
        }
        }
        -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
        -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
            setup_xfail hppa*-*-* CLLbs16899
            setup_xfail hppa*-*-* CLLbs16899
            fail "print pAe->f()"
            fail "print pAe->f()"
        }
        }
        -re ".*$gdb_prompt $" { fail "print pAe->f()" }
        -re ".*$gdb_prompt $" { fail "print pAe->f()" }
        timeout { fail "print pAe->f() (timeout)" }
        timeout { fail "print pAe->f() (timeout)" }
        eof { fail "print pAe->f() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
        eof { fail "print pAe->f() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
    }
    }
    if {$gcc_compiled} then { setup_xfail "*-*-*" }
    if {$gcc_compiled} then { setup_xfail "*-*-*" }
    send_gdb "print pAa->f()\n"
    send_gdb "print pAa->f()\n"
    gdb_expect {
    gdb_expect {
        -re ".* = 1$nl$gdb_prompt $" { pass "print pAa->f()" }
        -re ".* = 1$nl$gdb_prompt $" { pass "print pAa->f()" }
        -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
        -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
            setup_xfail hppa*-*-*  CLLbs16899
            setup_xfail hppa*-*-*  CLLbs16899
            fail "print pAa->f()"
            fail "print pAa->f()"
        }
        }
        -re ".*$gdb_prompt $" { fail "print pAa->f()" }
        -re ".*$gdb_prompt $" { fail "print pAa->f()" }
        timeout { fail "print pAa->f() (timeout)" }
        timeout { fail "print pAa->f() (timeout)" }
        eof { fail "print pAa->f() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
        eof { fail "print pAa->f() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
    }
    }
    if {$gcc_compiled} then { setup_xfail "*-*-*" }
    if {$gcc_compiled} then { setup_xfail "*-*-*" }
    send_gdb "print pDe->vg()\n"
    send_gdb "print pDe->vg()\n"
    gdb_expect {
    gdb_expect {
        -re ".* = 202$nl$gdb_prompt $" { pass "print pDe->vg()" }
        -re ".* = 202$nl$gdb_prompt $" { pass "print pDe->vg()" }
        -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
        -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
            setup_xfail hppa*-*-*  CLLbs16899
            setup_xfail hppa*-*-*  CLLbs16899
            fail "print pDe->vg()"
            fail "print pDe->vg()"
        }
        }
        -re ".*$gdb_prompt $" { fail "print pDe->vg()" }
        -re ".*$gdb_prompt $" { fail "print pDe->vg()" }
        timeout { fail "print pDe->vg() (timeout)" }
        timeout { fail "print pDe->vg() (timeout)" }
        eof { fail "print pDe->vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
        eof { fail "print pDe->vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
    }
    }
    if {$gcc_compiled} then { setup_xfail "*-*-*" }
    if {$gcc_compiled} then { setup_xfail "*-*-*" }
    send_gdb "print pADe->vg()\n"
    send_gdb "print pADe->vg()\n"
    gdb_expect {
    gdb_expect {
        -re ".* = 202$nl$gdb_prompt $" { pass "print pADe->vg()" }
        -re ".* = 202$nl$gdb_prompt $" { pass "print pADe->vg()" }
        -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
        -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
            setup_xfail hppa*-*-*  CLLbs16899
            setup_xfail hppa*-*-*  CLLbs16899
            fail "print pADe->vg()"
            fail "print pADe->vg()"
        }
        }
        -re ".*$gdb_prompt $" { fail "print pADe->vg()" }
        -re ".*$gdb_prompt $" { fail "print pADe->vg()" }
        timeout { fail "print pADe->vg() (timeout)" }
        timeout { fail "print pADe->vg() (timeout)" }
        eof { fail "print pADe->vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
        eof { fail "print pADe->vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
    }
    }
    if {$gcc_compiled} then { setup_xfail "*-*-*" }
    if {$gcc_compiled} then { setup_xfail "*-*-*" }
    send_gdb "print pDd->vg()\n"
    send_gdb "print pDd->vg()\n"
    gdb_expect {
    gdb_expect {
        -re ".* = 101$nl$gdb_prompt $" { pass "print pDd->vg()" }
        -re ".* = 101$nl$gdb_prompt $" { pass "print pDd->vg()" }
        -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
        -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
            setup_xfail hppa*-*-*  CLLbs16899
            setup_xfail hppa*-*-*  CLLbs16899
            fail "print pDd->vg()"
            fail "print pDd->vg()"
        }
        }
        -re ".*$gdb_prompt $" { fail "print pDd->vg()" }
        -re ".*$gdb_prompt $" { fail "print pDd->vg()" }
        timeout { fail "print pDd->vg() (timeout)" }
        timeout { fail "print pDd->vg() (timeout)" }
        eof { fail "print pDd->vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
        eof { fail "print pDd->vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
    }
    }
    if {$gcc_compiled} then { setup_xfail "*-*-*" }
    if {$gcc_compiled} then { setup_xfail "*-*-*" }
    send_gdb "print pEe->vvb()\n"
    send_gdb "print pEe->vvb()\n"
    gdb_expect {
    gdb_expect {
        -re ".* = 411$nl$gdb_prompt $" { pass "print pEe->vvb()" }
        -re ".* = 411$nl$gdb_prompt $" { pass "print pEe->vvb()" }
        -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
        -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
            setup_xfail hppa*-*-*  CLLbs16899
            setup_xfail hppa*-*-*  CLLbs16899
            fail "print pEe->vvb()"
            fail "print pEe->vvb()"
        }
        }
        -re ".*$gdb_prompt $" { fail "print pEe->vvb()" }
        -re ".*$gdb_prompt $" { fail "print pEe->vvb()" }
        timeout { fail "print pEe->vvb() (timeout)" }
        timeout { fail "print pEe->vvb() (timeout)" }
        eof { fail "print pEe->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
        eof { fail "print pEe->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
    }
    }
    if {$gcc_compiled} then { setup_xfail "*-*-*" }
    if {$gcc_compiled} then { setup_xfail "*-*-*" }
    send_gdb "print pVB->vvb()\n"
    send_gdb "print pVB->vvb()\n"
    gdb_expect {
    gdb_expect {
        -re ".* = 407$nl$gdb_prompt $" { pass "print pVB->vvb()" }
        -re ".* = 407$nl$gdb_prompt $" { pass "print pVB->vvb()" }
        -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
        -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
            setup_xfail hppa*-*-*  CLLbs16899
            setup_xfail hppa*-*-*  CLLbs16899
            fail "print pVB->vvb()"
            fail "print pVB->vvb()"
        }
        }
        -re ".*$gdb_prompt $" { fail "print pVB->vvb()" }
        -re ".*$gdb_prompt $" { fail "print pVB->vvb()" }
        timeout { fail "print pVB->vvb() (timeout)" }
        timeout { fail "print pVB->vvb() (timeout)" }
        eof { fail "print pVB->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
        eof { fail "print pVB->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
    }
    }
    if {$gcc_compiled} then { setup_xfail "*-*-*" }
    if {$gcc_compiled} then { setup_xfail "*-*-*" }
    send_gdb "print pBe->vvb()\n"
    send_gdb "print pBe->vvb()\n"
    gdb_expect {
    gdb_expect {
        -re ".* = 411$nl$gdb_prompt $" { pass "print pBe->vvb()" }
        -re ".* = 411$nl$gdb_prompt $" { pass "print pBe->vvb()" }
        -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
        -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
            setup_xfail hppa*-*-*  CLLbs16899
            setup_xfail hppa*-*-*  CLLbs16899
            fail "print pBe->vvb()"
            fail "print pBe->vvb()"
        }
        }
        -re ".*$gdb_prompt $" { fail "print pBe->vvb()" }
        -re ".*$gdb_prompt $" { fail "print pBe->vvb()" }
        timeout { fail "print pBe->vvb() (timeout)" }
        timeout { fail "print pBe->vvb() (timeout)" }
        eof { fail "print pBe->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
        eof { fail "print pBe->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
    }
    }
    if {$gcc_compiled} then { setup_xfail "*-*-*" }
    if {$gcc_compiled} then { setup_xfail "*-*-*" }
    send_gdb "print pDe->vvb()\n"
    send_gdb "print pDe->vvb()\n"
    gdb_expect {
    gdb_expect {
        -re ".* = 411$nl$gdb_prompt $" { pass "print pDe->vvb()" }
        -re ".* = 411$nl$gdb_prompt $" { pass "print pDe->vvb()" }
        -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
        -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
            setup_xfail hppa*-*-*  CLLbs16899
            setup_xfail hppa*-*-*  CLLbs16899
            fail "print pDe->vvb()"
            fail "print pDe->vvb()"
        }
        }
        -re ".*$gdb_prompt $" { fail "print pDe->vvb()" }
        -re ".*$gdb_prompt $" { fail "print pDe->vvb()" }
        timeout { fail "print pDe->vvb() (timeout)" }
        timeout { fail "print pDe->vvb() (timeout)" }
        eof { fail "print pDe->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
        eof { fail "print pDe->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
    }
    }
    if {$gcc_compiled} then { setup_xfail "*-*-*" }
    if {$gcc_compiled} then { setup_xfail "*-*-*" }
    send_gdb "print pEe->vd()\n"
    send_gdb "print pEe->vd()\n"
    gdb_expect {
    gdb_expect {
        -re ".* = 282$nl$gdb_prompt $" { pass "print pEe->vd()" }
        -re ".* = 282$nl$gdb_prompt $" { pass "print pEe->vd()" }
        -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
        -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
            setup_xfail hppa*-*-*  CLLbs16899
            setup_xfail hppa*-*-*  CLLbs16899
            fail "print pEe->vd()"
            fail "print pEe->vd()"
        }
        }
        -re ".*$gdb_prompt $" { fail "print pEe->vd()" }
        -re ".*$gdb_prompt $" { fail "print pEe->vd()" }
        timeout { fail "print pEe->vd() (timeout)" }
        timeout { fail "print pEe->vd() (timeout)" }
        eof { fail "print pEe->vd() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
        eof { fail "print pEe->vd() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
    }
    }
    if {$gcc_compiled} then { setup_xfail "*-*-*" }
    if {$gcc_compiled} then { setup_xfail "*-*-*" }
    send_gdb "print pEe->fvb()\n"
    send_gdb "print pEe->fvb()\n"
    gdb_expect {
    gdb_expect {
        -re ".* = 311$nl$gdb_prompt $" { pass "print pEe->fvb()" }
        -re ".* = 311$nl$gdb_prompt $" { pass "print pEe->fvb()" }
        -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
        -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
            setup_xfail hppa*-*-*  CLLbs16899
            setup_xfail hppa*-*-*  CLLbs16899
            fail "print pEe->fvb()"
            fail "print pEe->fvb()"
        }
        }
        -re ".*$gdb_prompt $" { fail "print pEe->fvb()" }
        -re ".*$gdb_prompt $" { fail "print pEe->fvb()" }
        timeout { fail "print pEe->fvb() (timeout)" }
        timeout { fail "print pEe->fvb() (timeout)" }
        eof { fail "print pEe->fvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
        eof { fail "print pEe->fvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
    }
    }
    if {$gcc_compiled} then { setup_xfail "*-*-*" }
    if {$gcc_compiled} then { setup_xfail "*-*-*" }
    send_gdb "print pEe->D::vg()\n"
    send_gdb "print pEe->D::vg()\n"
    setup_xfail "*-*-*"
    setup_xfail "*-*-*"
    gdb_expect {
    gdb_expect {
        -re ".* = 102$nl$gdb_prompt $" { pass "print pEe->D::vg()" }
        -re ".* = 102$nl$gdb_prompt $" { pass "print pEe->D::vg()" }
        -re ".*$gdb_prompt $" { fail "print pEe->D::vg()" }
        -re ".*$gdb_prompt $" { fail "print pEe->D::vg()" }
        timeout { fail "print pEe->D::vg() (timeout)" }
        timeout { fail "print pEe->D::vg() (timeout)" }
        eof { fail "print pEe->D::vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
        eof { fail "print pEe->D::vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
    }
    }
}
}
proc do_tests {} {
proc do_tests {} {
    global prms_id
    global prms_id
    global bug_id
    global bug_id
    set prms_id 0
    set prms_id 0
    set bug_id 0
    set bug_id 0
    gdb_start;
    gdb_start;
    gdb_virtfunc_init;
    gdb_virtfunc_init;
    # Get the debug format for the compiled test case.  If that
    # Get the debug format for the compiled test case.  If that
    # format is DWARF 1 then just skip all the tests since none of
    # format is DWARF 1 then just skip all the tests since none of
    # them will pass.
    # them will pass.
    if [ runto_main ] then {
    if [ runto_main ] then {
        get_debug_format
        get_debug_format
        if [ setup_xfail_format "DWARF 1" ] then {
        if [ setup_xfail_format "DWARF 1" ] then {
            fail "C++ tests skipped due to limited C++ support in DWARF 1 debug format"
            fail "C++ tests skipped due to limited C++ support in DWARF 1 debug format"
            return
            return
        }
        }
        clear_xfail "*-*-*"
        clear_xfail "*-*-*"
    }
    }
    test_ptype_of_classes
    test_ptype_of_classes
    if [ runto 'test_calls(void)' ] then {
    if [ runto 'test_calls(void)' ] then {
        test_virtual_calls
        test_virtual_calls
    }
    }
}
}
do_tests
do_tests
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.