Found this while testing the branch on ia64. The call to expand_val_compare_and_swap() above returns NULL_RTX when it can't find a suitable instruction.

OK for branch?
        * optabs.c (expand_atomic_load): Handle a NULL target.

Index: optabs.c
===================================================================
--- optabs.c    (revision 180273)
+++ optabs.c    (working copy)
@@ -7140,7 +7140,7 @@ expand_atomic_load (rtx target, rtx mem,
       return target;
     }
 
-  if (target == const0_rtx)
+  if (!target || target == const0_rtx)
     target = gen_reg_rtx (mode);
 
   /* Emit the appropriate barrier before the load.  */

Reply via email to