diff options
Diffstat (limited to 'gdb/testsuite/gdb.compile')
-rw-r--r-- | gdb/testsuite/gdb.compile/compile.c | 7 | ||||
-rw-r--r-- | gdb/testsuite/gdb.compile/compile.exp | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.compile/compile.c b/gdb/testsuite/gdb.compile/compile.c index 8170a3a..04beae8 100644 --- a/gdb/testsuite/gdb.compile/compile.c +++ b/gdb/testsuite/gdb.compile/compile.c @@ -100,6 +100,13 @@ int globalshadow = 10; static int staticshadow = 20; int externed = 7; +struct struct_with_array +{ + char val[7]; +}; + +static struct struct_with_array swa; + int main (void) { diff --git a/gdb/testsuite/gdb.compile/compile.exp b/gdb/testsuite/gdb.compile/compile.exp index fed7b04..f522a84 100644 --- a/gdb/testsuite/gdb.compile/compile.exp +++ b/gdb/testsuite/gdb.compile/compile.exp @@ -397,3 +397,6 @@ gdb_test "p globalvar" " = 1" "expect 1" gdb_test_no_output "compile code shlibvar += 5;" "modify shared library variable" gdb_test "p shlibvar" " = 15" "expect 15" + +# This used to fail due to alignment. PR compile/31397. +gdb_test_no_output "compile code swa.val\[0\] = 1" |