File tree Expand file tree Collapse file tree 2 files changed +7
-11
lines changed
regression/verilog/assignments Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Original file line number Diff line number Diff line change 1
- KNOWNBUG
1
+ CORE
2
2
assignment-context1.sv
3
3
4
4
^EXIT=0$
5
5
^SIGNAL=0$
6
6
--
7
7
^warning: ignoring
8
8
--
9
- The variants that enlarge give a wrong answer.
Original file line number Diff line number Diff line change @@ -42,15 +42,12 @@ void verilog_typecheckt::assignment_conversion(
42
42
const typet &lhs_type)
43
43
{
44
44
// Implements 1800-2017 10.7
45
- // If the RHS is smaller than the LHS:
46
- // * if the RHS is unsigned, it is zero-padded
47
- // * if the RHS is signed, it is sign-extended
48
- // If the RHS is larger than the LHS, it is truncated.
49
-
50
- // This matches our typecast, but differs from the steps taken
51
- // when evaluating binary expressions (11.8.2), where sign
52
- // extension only happens when the propagated type is signed.
53
- implicit_typecast (rhs, lhs_type);
45
+ // "The size of the left-hand side of an assignment forms
46
+ // the context for the right-hand expression."
47
+
48
+ // This is _size_ only, the type of the RHS is retained.
49
+
50
+ downwards_type_propagation (rhs, lhs_type);
54
51
}
55
52
56
53
/* ******************************************************************\
You can’t perform that action at this time.
0 commit comments