From 3d2ef969b7ba9174ea7edb1b2d8890133b9add46 Mon Sep 17 00:00:00 2001 From: chastain Date: Sun, 23 Nov 2003 18:24:46 +0000 Subject: [PATCH] 2003-11-23 Michael Chastain Partial fix for PR testsuite/1456. * gdb.cp/ambiguous.exp: Replace reference to gcc_compiled with call to test_compiler_info. * gdb.cp/ctti.exp: Likewise. * gdb.cp/derivation.exp: Likewise. * gdb.cp/member-ptr.exp: Likewise. * gdb.cp/virtfunc.exp (test_virtual_calls): Remove unused reference to gcc_compiled. --- gdb/testsuite/ChangeLog | 13 ++++++++++++- gdb/testsuite/gdb.cp/ambiguous.exp | 4 ++-- gdb/testsuite/gdb.cp/ctti.exp | 4 ++-- gdb/testsuite/gdb.cp/derivation.exp | 6 +++--- gdb/testsuite/gdb.cp/member-ptr.exp | 4 ++-- gdb/testsuite/gdb.cp/virtfunc.exp | 1 - 6 files changed, 21 insertions(+), 11 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 30ac5f165b..5f76285320 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,4 +1,15 @@ -2003-11-23 Michael Chastain +2003-11-23 Michael Chastain + + Partial fix for PR testsuite/1456. + * gdb.cp/ambiguous.exp: Replace reference to gcc_compiled with + call to test_compiler_info. + * gdb.cp/ctti.exp: Likewise. + * gdb.cp/derivation.exp: Likewise. + * gdb.cp/member-ptr.exp: Likewise. + * gdb.cp/virtfunc.exp (test_virtual_calls): Remove unused + reference to gcc_compiled. + +2003-11-23 Michael Chastain Fix PR testsuite/1463. * gdb.base/structs.exp (start_structs_test): Call diff --git a/gdb/testsuite/gdb.cp/ambiguous.exp b/gdb/testsuite/gdb.cp/ambiguous.exp index 4224b2d79f..6385dcb9ae 100644 --- a/gdb/testsuite/gdb.cp/ambiguous.exp +++ b/gdb/testsuite/gdb.cp/ambiguous.exp @@ -1,4 +1,4 @@ -# Copyright 1998, 1999 Free Software Foundation, Inc. +# Copyright 1998, 1999, 2003 Free Software Foundation, Inc. # 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 @@ -45,7 +45,7 @@ if [get_compiler_info ${binfile} "c++"] { return -1; } -if { $gcc_compiled } then { continue } +if { [test_compiler_info gcc-*] } then { continue } if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } { gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." diff --git a/gdb/testsuite/gdb.cp/ctti.exp b/gdb/testsuite/gdb.cp/ctti.exp index 96e9fcff81..1bc005afed 100644 --- a/gdb/testsuite/gdb.cp/ctti.exp +++ b/gdb/testsuite/gdb.cp/ctti.exp @@ -1,4 +1,4 @@ -# Copyright 1998, 1999, 2001 Free Software Foundation, Inc. +# Copyright 1998, 1999, 2001, 2003 Free Software Foundation, Inc. # 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 @@ -46,7 +46,7 @@ if [get_compiler_info ${binfile} "c++"] { return -1; } -if { $gcc_compiled } then { continue } +if { [test_compiler_info gcc-*] } then { continue } #if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile1} ${srcdir}/${subdir}/${srcfile2} ${srcdir}/${subdir}/${srcfile3}" "${binfile}" executable {debug c++}] != "" } { # gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." diff --git a/gdb/testsuite/gdb.cp/derivation.exp b/gdb/testsuite/gdb.cp/derivation.exp index 38a46a2bea..39acf2570a 100644 --- a/gdb/testsuite/gdb.cp/derivation.exp +++ b/gdb/testsuite/gdb.cp/derivation.exp @@ -1,4 +1,4 @@ -# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +# Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. # 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 @@ -109,7 +109,7 @@ gdb_expect { timeout { fail "(timeout) print value of d_instance" } } - if {$gcc_compiled} then { + if { [test_compiler_info gcc-*] } then { send_gdb "ptype d_instance\n" gdb_expect { -re "type = class D : private A, public B, (protected|private) C \{\r\n\[\t \]*public:\r\n\[\t \]*int d;\r\n\[\t \]*int dd;\[\r\n\t ]+D & operator=\\(D const ?&\\);\[\r\n\t ]+D\\((D const|const D) ?&\\);\[\r\n\t \]+D\\((void|)\\);\r\n\[\t \]*int dfoo\\((void|)\\);\r\n\[\t \]*int foo\\((void|)\\);\r\n\}.*$gdb_prompt $" { pass "ptype d_instance" } @@ -140,7 +140,7 @@ gdb_expect { timeout { fail "(timeout) print value of e_instance" } } - if {$gcc_compiled} { + if { [test_compiler_info gcc-*] } then { send_gdb "ptype e_instance\n" gdb_expect { -re "type = class E : public A, private B, (protected|private) C \{\r\n\[\t \]*public:\r\n\[\t \]*int e;\r\n\[\t \]*int ee;\[\r\n\t ]+E & operator=\\(E const ?&\\);\[\r\n\t ]+E\\((E const|const E) ?&\\);\[\r\n\t \]+E\\((void|)\\);\r\n\[\t \]*int efoo\\((void|)\\);\r\n\[\t \]*int foo\\((void|)\\);\r\n\}.*$gdb_prompt $" { pass "ptype e_instance" } diff --git a/gdb/testsuite/gdb.cp/member-ptr.exp b/gdb/testsuite/gdb.cp/member-ptr.exp index f21cd1506e..82437859d8 100644 --- a/gdb/testsuite/gdb.cp/member-ptr.exp +++ b/gdb/testsuite/gdb.cp/member-ptr.exp @@ -1,4 +1,4 @@ -# Copyright 1998, 1999 Free Software Foundation, Inc. +# Copyright 1998, 1999, 2003 Free Software Foundation, Inc. # 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 @@ -54,7 +54,7 @@ if [get_compiler_info ${binfile} "c++"] { # Nearly all of these tests fail when compiled with G++, so just give up # until GDB gets enhanced. -sts 1999-06-22 -if {$gcc_compiled} { +if { [test_compiler_info gcc-*] } then { continue } diff --git a/gdb/testsuite/gdb.cp/virtfunc.exp b/gdb/testsuite/gdb.cp/virtfunc.exp index dbd575cfb3..ff36c27cc3 100644 --- a/gdb/testsuite/gdb.cp/virtfunc.exp +++ b/gdb/testsuite/gdb.cp/virtfunc.exp @@ -734,7 +734,6 @@ proc test_virtual_calls {} { global gdb_prompt global GDB global nl - global gcc_compiled if [target_info exists gdb,cannot_call_functions] { setup_xfail "*-*-*" 2416 -- 2.11.0