diff options
Diffstat (limited to 'gdb/opencl-lang.c')
-rw-r--r-- | gdb/opencl-lang.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gdb/opencl-lang.c b/gdb/opencl-lang.c index d7e66c4..4720e2b 100644 --- a/gdb/opencl-lang.c +++ b/gdb/opencl-lang.c @@ -1035,10 +1035,13 @@ Cannot perform conditional operation on vectors with different sizes")); } else { - /* Also handle EVAL_AVOID_SIDE_EFFECTS. */ - return value_struct_elt (&arg1, NULL, - &exp->elts[pc + 2].string, NULL, - "structure"); + struct value *v = value_struct_elt (&arg1, NULL, + &exp->elts[pc + 2].string, NULL, + "structure"); + + if (noside == EVAL_AVOID_SIDE_EFFECTS) + v = value_zero (value_type (v), not_lval); + return v; } } default: |