From: mec.gnu@mindspring.com (Michael Elizabeth Chastain)
To: gdb-patches@sources.redhat.com
Subject: [rfa/testsuite] constvars.exp, volatile.exp: hp-ux
Date: Wed, 07 Jan 2004 22:38:00 -0000 [thread overview]
Message-ID: <20040107223849.B6ED24B35A@berman.michael-chastain.com> (raw)
This patch improves constvars.exp and volatile.exp to work with
the HP compilers on hp-ux.
First, there was some code to force use of the HP C++ compiler instead
of the HP C compiler. I killed that. The user decides at a higher
level which compilers to use for which languages.
That bit of code wasn't even helping because HP C++ returns a (valid)
compiler error for constvars.c. For the curious, this line is
not valid C++:
# Uninitialized const/reference member in class/aggregate.
struct crass { char * const ptr; } crass;
Since ptr itself is const, it can't be changed after it's initialized,
so it must be initialized.
I'm not dealing with that right now. gdb.base/*.c does not have to
compile with a C++ compiler.
Second, I removed a duplicate call to get_compiler_info. That's
just cleanup.
Third, in local_compiler_xfail_check, I added setup_xfail for
$hp_cc_compiler. The HP Ansi C compiler does not emit const qualifiers,
so this is really an XFAIL, a limitation in the external compiler. I
checked that by stepping through hpread.c by hand.
Tested on:
native hppa2.0w-hp-hpux11.11, hp ansi c
Okay to commit?
Michael C
2004-01-07 Michael Chastain <mec.gnu@mindspring.com>
* gdb.base/constvars.exp: Do not force lang=c++ if using HP
compilers. Delete duplicate call to get_compiler_info.
(local_compiler_xfail_check): setup_xfail if $hp_cc_compiler.
* gdb.base/volatile.exp: Likewise.
diff -c3p -r /house/chastain/HEAD/src/gdb/testsuite/gdb.base/constvars.exp gdb.base/constvars.exp
*** /house/chastain/HEAD/src/gdb/testsuite/gdb.base/constvars.exp 2003-11-29 01:56:06.000000000 -0500
--- gdb.base/constvars.exp 2004-01-07 16:47:17.000000000 -0500
***************
*** 1,4 ****
! # Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
--- 1,4 ----
! # Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
*************** if [get_compiler_info ${binfile}] {
*** 48,70 ****
return -1;
}
! if {$hp_aCC_compiler || $hp_cc_compiler} {
! set lang "c++"
! } else {
! set lang ""
! }
!
! if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [concat debug $lang]] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
- # Create and source the file that provides information about the compiler
- # used to compile the test case.
-
- if [get_compiler_info ${binfile}] {
- return -1;
- }
-
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
--- 48,57 ----
return -1;
}
! if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug ] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
*************** proc local_compiler_xfail_check { } {
*** 88,93 ****
--- 75,85 ----
setup_xfail "*-*-*"
}
}
+
+ global hp_cc_compiler
+ if { $hp_cc_compiler } {
+ setup_xfail "hppa*-*-hpux*"
+ }
}
send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
diff -c3p -r /house/chastain/HEAD/src/gdb/testsuite/gdb.base/volatile.exp gdb.base/volatile.exp
*** /house/chastain/HEAD/src/gdb/testsuite/gdb.base/volatile.exp 2004-01-06 14:05:14.000000000 -0500
--- gdb.base/volatile.exp 2004-01-07 16:50:05.000000000 -0500
*************** if [get_compiler_info ${binfile}] {
*** 55,74 ****
return -1;
}
! if {$hp_aCC_compiler || $hp_cc_compiler} {
! set lang "c++"
! } else {
! set lang ""
! }
!
! if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [concat debug $lang]] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
- if [get_compiler_info ${binfile}] {
- return -1
- }
-
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
--- 55,64 ----
return -1;
}
! if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug ] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
*************** proc local_compiler_xfail_check { } {
*** 91,96 ****
--- 81,91 ----
setup_xfail "*-*-*"
}
}
+
+ global hp_cc_compiler
+ if { $hp_cc_compiler } {
+ setup_xfail "hppa*-*-hpux*"
+ }
}
send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
next reply other threads:[~2004-01-07 22:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-07 22:38 Michael Elizabeth Chastain [this message]
2004-01-07 22:40 ` Daniel Jacobowitz
2004-01-07 22:47 Michael Elizabeth Chastain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040107223849.B6ED24B35A@berman.michael-chastain.com \
--to=mec.gnu@mindspring.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox