diff options
Diffstat (limited to 'gdb/valarith.c')
-rw-r--r-- | gdb/valarith.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/valarith.c b/gdb/valarith.c index 3150309..299a99f 100644 --- a/gdb/valarith.c +++ b/gdb/valarith.c @@ -1076,6 +1076,9 @@ complex_binop (struct value *arg1, struct value *arg2, enum exp_opcode op) struct type *comp_type = promotion_type (value_type (arg1_real), value_type (arg2_real)); + if (!can_create_complex_type (comp_type)) + error (_("Argument to complex arithmetic operation not supported.")); + arg1_real = value_cast (comp_type, arg1_real); arg1_imag = value_cast (comp_type, arg1_imag); arg2_real = value_cast (comp_type, arg2_real); |