- /* DP errors if the last instruction is not an INSTR_DONE
- * and for debugging purposes we add an additional AINSTR_END
- * to the end of functions, so here it goes:
- */
- stmt.opcode = INSTR_DONE;
- stmt.o1.u1 = 0;
- stmt.o2.u1 = 0;
- stmt.o3.u1 = 0;
- code_push_statement(&stmt, vec_last(code_linenums));
+ /* DP errors if the last instruction is not an INSTR_DONE. */
+ if (vec_last(code_statements).opcode != INSTR_DONE)
+ {
+ stmt.opcode = INSTR_DONE;
+ stmt.o1.u1 = 0;
+ stmt.o2.u1 = 0;
+ stmt.o3.u1 = 0;
+ code_push_statement(&stmt, vec_last(code_linenums));
+ }