From fce632b6dc97eaa7e9f10f5c2c7dd8fd55931a51 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 25 Mar 2013 17:26:18 +0000 Subject: PR c++/9197: * opencl-lang.c (evaluate_subexp_opencl) : Use value_struct_elt, not lookup_struct_elt_type. * eval.c (evaluate_subexp_standard) : Use value_struct_elt, not lookup_struct_elt_type. * expression.h (EVAL_AVOID_SIDE_EFFECTS): Update comment. gdb/testsuite * gdb.cp/m-static.exp: Add constructor ptype tests. * gdb.cp/m-static.cc (single_constructor): New class. (main): Make instance of single_constructor. --- gdb/opencl-lang.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'gdb/opencl-lang.c') diff --git a/gdb/opencl-lang.c b/gdb/opencl-lang.c index 819a832..d7e66c4 100644 --- a/gdb/opencl-lang.c +++ b/gdb/opencl-lang.c @@ -1035,15 +1035,10 @@ Cannot perform conditional operation on vectors with different sizes")); } else { - if (noside == EVAL_AVOID_SIDE_EFFECTS) - return - value_zero (lookup_struct_elt_type - (value_type (arg1),&exp->elts[pc + 2].string, 0), - lval_memory); - else - return value_struct_elt (&arg1, NULL, - &exp->elts[pc + 2].string, NULL, - "structure"); + /* Also handle EVAL_AVOID_SIDE_EFFECTS. */ + return value_struct_elt (&arg1, NULL, + &exp->elts[pc + 2].string, NULL, + "structure"); } } default: -- cgit v1.1