+ if { ! [test_compiler_info "gcc-*"]} {
+ setup_xfail "mips-sgi-irix6*"
+ }
+ if [target_info exists gdb,cannot_call_functions] {
+ setup_xfail "*-*-*" 2416
+ fail "p/c array_index(\"abcdef\",2)"
+ } else {
+ #
+ # On HP-UX, a support function (__d_plt_call) necessary to
+ # implement an inferior call is normally only available when
+ # the inferior was compiled with -g. Thus, we expect this
+ # testpoint to fail on HP-UX.
+ if { [istarget "hppa*-hpux*"] } {
+ gdb_test_multiple "p/c array_index(\"abcdef\",2)" \
+ "p/c array_index(\"abcdef\",2)" {
+ -re ".*Suggest linking executable with -g.*$gdb_prompt $" {
+ pass "p/c array_index(\"abcdef\",2)"
+ }
+ -re ".*Cannot find __wdb_call_dummy in.*end.o.*" {
+ pass "p/c array_index(\"abcdef\",2)"
+ }
+ -re ".*99 'c'.*" {
+ pass "p/c array_index(\"abcdef\",2)"
+ }
+ }
+ } else {
+ # We need to up this because this can be really slow on some boards.
+ # (malloc() is called as part of the test).
+ set prev_timeout $timeout
+ set timeout 60
+ gdb_test {p/c array_index("abcdef",2)} " = 99 'c'"
+ set timeout $prev_timeout
+ }
+ }