Skip to content

Commit 9e35296

Browse files
author
Daniel Kroening
committed
ieee_float_op_exprt should set the type
1 parent 58d440a commit 9e35296

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/util/std_expr.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4268,8 +4268,9 @@ inline void validate_expr(const ieee_float_notequal_exprt &value)
42684268
validate_operands(value, 2, "IEEE inequality must have two operands");
42694269
}
42704270

4271-
42724271
/// \brief IEEE floating-point operations
4272+
/// These have two data operands (op0 and op1) and one rounding mode (op2).
4273+
/// The type of the result is that of the data operands.
42734274
class ieee_float_op_exprt:public exprt
42744275
{
42754276
public:
@@ -4283,8 +4284,8 @@ class ieee_float_op_exprt:public exprt
42834284
const exprt &_lhs,
42844285
const irep_idt &_id,
42854286
const exprt &_rhs,
4286-
const exprt &_rm):
4287-
exprt(_id)
4287+
const exprt &_rm)
4288+
: exprt(_id, _lhs.type())
42884289
{
42894290
add_to_operands(_lhs, _rhs, _rm);
42904291
}

0 commit comments

Comments
 (0)