File tree Expand file tree Collapse file tree 2 files changed +36
-2
lines changed
regression/cbmc-concurrency/atomic_section_sc7 Expand file tree Collapse file tree 2 files changed +36
-2
lines changed Original file line number Diff line number Diff line change 1
- KNOWNBUG
1
+ CORE
2
2
main.c
3
3
--program-only
4
4
^EXIT=0$
Original file line number Diff line number Diff line change @@ -65,8 +65,42 @@ void guard_exprt::add(const exprt &expr)
65
65
66
66
guard_exprt &operator -=(guard_exprt &g1, const guard_exprt &g2)
67
67
{
68
- if (g1.expr .id () != ID_and || g2.expr .id () != ID_and)
68
+ if (g1.expr .id () != ID_and)
69
+ {
70
+ if (g2.expr .id () != ID_and)
71
+ {
72
+ if (g1.expr == g2.expr )
73
+ g1.expr = true_exprt{};
74
+ }
75
+ else
76
+ {
77
+ for (const auto &op : g2.expr .operands ())
78
+ {
79
+ if (g1.expr == op)
80
+ {
81
+ g1.expr = true_exprt{};
82
+ break ;
83
+ }
84
+ }
85
+ }
86
+
69
87
return g1;
88
+ }
89
+
90
+ if (g2.expr .id () != ID_and)
91
+ {
92
+ exprt::operandst &op1 = g1.expr .operands ();
93
+ for (exprt::operandst::iterator it = op1.begin (); it != op1.end (); ++it)
94
+ {
95
+ if (g1.expr == g2.expr )
96
+ {
97
+ op1.erase (it);
98
+ break ;
99
+ }
100
+ }
101
+
102
+ return g1;
103
+ }
70
104
71
105
sort_and_join (g1.expr );
72
106
exprt g2_sorted = g2.as_expr ();
You can’t perform that action at this time.
0 commit comments