diff options
author | Tom Tromey <tromey@redhat.com> | 2013-05-13 16:51:52 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-05-13 16:51:52 +0000 |
commit | ac1ca910d74d5bd1d2800cb190659c9e3043a904 (patch) | |
tree | a62ca0d718e74c6dd7d0f7eca45ac3c9a1a728fe /gdb/testsuite | |
parent | fd7b2a545d530118913b1aefbfd8526785d3c2cc (diff) | |
download | gdb-ac1ca910d74d5bd1d2800cb190659c9e3043a904.zip gdb-ac1ca910d74d5bd1d2800cb190659c9e3043a904.tar.gz gdb-ac1ca910d74d5bd1d2800cb190659c9e3043a904.tar.bz2 |
PR exp/15364:
* eval.c (evaluate_subexp_standard) <STRUCTOP_STRUCT,
STRUCTOP_PTR>: Return a not_lval value for
EVAL_AVOID_SIDE_EFFECTS.
* opencl-lang.c (evaluate_subexp_opencl): Return a not_lval value
for EVAL_AVOID_SIDE_EFFECTS.
gdb/testsuite
* gdb.base/exprs.exp (test_expr): Add regression test.
* gdb.base/exprs.c (null_t_struct): New global.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/exprs.c | 1 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/exprs.exp | 4 |
3 files changed, 10 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index c4a6237..fc74fbb 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-05-13 Tom Tromey <tromey@redhat.com> + + * gdb.base/exprs.exp (test_expr): Add regression test. + * gdb.base/exprs.c (null_t_struct): New global. + 2013-05-13 Muhammad Bilal <mbilal@codesourcery.com> * gdb.base/default.exp: Disable history saving. diff --git a/gdb/testsuite/gdb.base/exprs.c b/gdb/testsuite/gdb.base/exprs.c index 90c0f25..e1ad182 100644 --- a/gdb/testsuite/gdb.base/exprs.c +++ b/gdb/testsuite/gdb.base/exprs.c @@ -185,6 +185,7 @@ union tu_link { enum colors {red, green, blue} color; enum cars {chevy, ford, porsche} clunker; +struct t_struct *null_t_struct; void dummy() { diff --git a/gdb/testsuite/gdb.base/exprs.exp b/gdb/testsuite/gdb.base/exprs.exp index fa3cdb4..d2e23c9 100644 --- a/gdb/testsuite/gdb.base/exprs.exp +++ b/gdb/testsuite/gdb.base/exprs.exp @@ -273,3 +273,7 @@ gdb_test "print {short} v_short_array" "$decimal = 42" # Regression tests for cast to void. gdb_test "print (void) v_int_pointer" " = void" gdb_test "print & (void) v_char" "value not located in memory." + +# Regression test for "&&". +gdb_test "print null_t_struct && null_t_struct->v_int_member == 0" \ + " = 0" |