* Re: [rfa/testsuite] constvars.exp, volatile.exp: hp-ux
@ 2004-01-07 22:47 Michael Elizabeth Chastain
0 siblings, 0 replies; 3+ messages in thread
From: Michael Elizabeth Chastain @ 2004-01-07 22:47 UTC (permalink / raw)
To: drow, mec.gnu; +Cc: gdb-patches
Committed.
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [rfa/testsuite] constvars.exp, volatile.exp: hp-ux
@ 2004-01-07 22:38 Michael Elizabeth Chastain
2004-01-07 22:40 ` Daniel Jacobowitz
0 siblings, 1 reply; 3+ messages in thread
From: Michael Elizabeth Chastain @ 2004-01-07 22:38 UTC (permalink / raw)
To: gdb-patches
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 $"
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [rfa/testsuite] constvars.exp, volatile.exp: hp-ux
2004-01-07 22:38 Michael Elizabeth Chastain
@ 2004-01-07 22:40 ` Daniel Jacobowitz
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2004-01-07 22:40 UTC (permalink / raw)
To: Michael Elizabeth Chastain; +Cc: gdb-patches
On Wed, Jan 07, 2004 at 05:38:49PM -0500, Michael Chastain wrote:
> 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?
Yes, this is fine.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-01-07 22:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-07 22:47 [rfa/testsuite] constvars.exp, volatile.exp: hp-ux Michael Elizabeth Chastain
-- strict thread matches above, loose matches on Subject: below --
2004-01-07 22:38 Michael Elizabeth Chastain
2004-01-07 22:40 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox