Index: /trunk/source/lisp-kernel/arm-exceptions.c
===================================================================
--- /trunk/source/lisp-kernel/arm-exceptions.c	(revision 14753)
+++ /trunk/source/lisp-kernel/arm-exceptions.c	(revision 14754)
@@ -1658,14 +1658,21 @@
         */
       } else {
+        Boolean ok = false;
         update_bytes_allocated(tcr, (void *) ptr_from_lispobj(cur_allocptr + disp));
         xpGPR(xp, allocptr) = VOID_ALLOCPTR + disp;
         instr = program_counter[-1];
-        if (IS_COMPARE_ALLOCPTR_TO_RM(instr)){
-          xpGPR(xp,RM_field(instr)) = VOID_ALLOCPTR;
+        if (IS_BRANCH_AROUND_ALLOC_TRAP(instr)) {
+          instr = program_counter[-2];
+          if (IS_COMPARE_ALLOCPTR_TO_RM(instr)){
+            xpGPR(xp,RM_field(instr)) = VOID_ALLOCPTR;
+            ok = true;
+          }
+        }
+        if (ok) {
+        /* Clear the carry bit, so that the trap will be taken. */
+        xpPSR(xp) &= ~PSR_C_MASK;
         } else {
           Bug(NULL, "unexpected instruction preceding alloc trap.");
         }
-        /* Clear the carry bit, so that the trap will be taken. */
-        xpPSR(xp) &= ~PSR_C_MASK;
       }
     } else {
