diff options
Diffstat (limited to 'gdb/testsuite/gdb.compile/compile.exp')
-rw-r--r-- | gdb/testsuite/gdb.compile/compile.exp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/gdb/testsuite/gdb.compile/compile.exp b/gdb/testsuite/gdb.compile/compile.exp index dc09770..07276bd 100644 --- a/gdb/testsuite/gdb.compile/compile.exp +++ b/gdb/testsuite/gdb.compile/compile.exp @@ -71,13 +71,13 @@ gdb_test_no_output "compile -- f = 10" \ gdb_test "compile f = 10;" ".*= 10;: No such file.*" \ "Test abbreviations and code collision" -gdb_test_no_output "compile -r -- _gdb_expr(){int i = 5;}" \ +gdb_test_no_output "compile -r -- void _gdb_expr(){int i = 5;}" \ "Test delimiter with -r" -gdb_test_no_output "compile -raw -- _gdb_expr(){int i = 5;}" \ +gdb_test_no_output "compile -raw -- void _gdb_expr(){int i = 5;}" \ "Test delimiter with -raw" -gdb_test "compile -- -r _gdb_expr(){int i = 5;}" \ +gdb_test "compile -- -r void _gdb_expr(){int i = 5;}" \ ".* error: 'r' undeclared \\(first use in this function\\).*" \ "Test delimiter with -r after it" @@ -189,7 +189,15 @@ gdb_test "p localvar" " = 1" # Test setting fields and also many different types. # -gdb_test_no_output "compile code struct_object.selffield = &struct_object" +set test "compile code struct_object.selffield = &struct_object" +gdb_test_multiple $test $test { + -re "^$test\r\n$gdb_prompt $" { + pass "$test" + } + -re "gdb command line:1:25: warning: assignment discards 'volatile' qualifier from pointer target type \\\[-Wdiscarded-qualifiers\\\]\r\n$gdb_prompt $" { + xfail "$test (PR compile/18202)" + } +} gdb_test "print struct_object.selffield == &struct_object" " = 1" gdb_test_no_output "compile code struct_object.charfield = 1" @@ -261,7 +269,7 @@ gdb_test "print 'compile.c'::globalshadow" " = 77000" \ # Test GOT vs. resolving jit function pointers. -gdb_test_no_output "compile -raw -- int func(){return 21;} _gdb_expr(){int (*funcp)()=func; if (funcp()!=21) abort();}" \ +gdb_test_no_output "compile -raw -- int func(){return 21;} void _gdb_expr(){ void abort (void); int (*funcp)()=func; if (funcp()!=21) abort(); }" \ "pointer to jit function" # |