* gdb.base/volatile.exp: Likewise.
+2003-06-29 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.base/constvars.exp: Remove most xfails for GCC 3.x.
+ * gdb.base/volatile.exp: Likewise.
+
2003-06-29 Daniel Jacobowitz <drow@mvista.com>
* gdb.threads/print-threads.exp (test_all_threads): Add kfail for
proc local_compiler_xfail_check { } {
global gcc_compiled;
- if {$gcc_compiled} then {
+ if {$gcc_compiled == 2} then {
if { ![test_debug_format "HP"] \
&& ![test_debug_format "DWARF 2"] } then {
setup_xfail "*-*-*"
# test function parameters
local_compiler_xfail_check
+if {$gcc_compiled == 3 && [test_debug_format "stabs"]} then {
+ # With stabs, even GCC 3 does not get the const char arguments correct.
+ setup_xfail "*-*-*"
+}
send_gdb "ptype qux1\n"
gdb_expect {
-re "type = int \\(const char, const char, const char \\*, char \\* const\\).*$gdb_prompt $" {
# test vars and pointers
proc do_constvar_tests {} {
+ global gcc_compiled
+
gdb_test "print lave" " = 66 'B'"
gdb_test "ptype lave" "type = char"
gdb_test "print lavish" " = 10 '\\\\n'"
gdb_test "ptype locust" "type = double \\* const"
local_compiler_xfail_check
+ if {$gcc_compiled == 3 && [test_debug_format "stabs"]} then {
+ # With stabs, even GCC 3 does not get the constant structure member
+ # correct.
+ setup_xfail "*-*-*"
+ }
gdb_test "ptype crass" "type = struct crass \{\[\r\n\]+\[\ \t\]+char \\* const ptr;\[\r\n\]+\}"
local_compiler_xfail_check
gdb_test "ptype crisp" "type = struct crisp \{\[\r\n\]+\[\ \t\]+char \\* const \\*ptr;\[\r\n\]+\}"
-# Copyright 1997, 1998, 1999 Free Software Foundation, Inc.
+# Copyright 1997, 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
proc local_compiler_xfail_check { } {
global gcc_compiled;
- if {$gcc_compiled} then {
+ if {$gcc_compiled == 2} then {
if { ![test_debug_format "HP"] \
&& ![test_debug_format "DWARF 2"] } then {
setup_xfail "*-*-*"
# test function parameters
local_compiler_xfail_check
+if {$gcc_compiled == 3 && [test_debug_format "stabs"]} then {
+ # For reasons unknown, GCC 3 with stabs mangles several cv-qualified
+ # arguments to this function.
+ setup_xfail "*-*-*"
+}
send_gdb "ptype qux2\n"
gdb_expect {
-re "type = int \\(volatile unsigned char, const volatile int, volatile short( int)?, volatile long( int)? \\*, float \\* volatile, const volatile signed char \\* const volatile\\).*$gdb_prompt $" {