ERROR1:
a = sum.read(1) + b
ERROR2:
a = a + 1
ERROR3:
The target limits the number of actions accessing a single register to 4.
ERROR4:
Conditions in an action must be simple comparisons of an action data parameter
Try moving the test out of the action and into a control apply block, or making it part of the table key
ERROR5:
Table placement cannot make any more progress. Though some tables have not yet been placed,
dependency analysis has found that no more tables are placeable.
ERROR6:
Ingress.sum_0: uses of all registers within a single action have to use the same addressing.
ERROR7:
The Tofino architecture requires all indirect externs to be addressed with the same expression across all actions they are used in.
You can also try to distribute individual indirect externs into separate tables.