[Bug middle-end/71514] ICE on C11 code with atomic exchange at -O1 and above on x86_64-linux-gnu: in copy_reference_ops_from_ref, at tree-ssa-sccvn.c:879

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jun 13 11:18:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71514

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Plus

Index: gcc/c-family/c-common.c
===================================================================
--- gcc/c-family/c-common.c     (revision 237372)
+++ gcc/c-family/c-common.c     (working copy)
@@ -11129,8 +11129,8 @@ resolve_overloaded_atomic_exchange (loca
   p0 = build1 (VIEW_CONVERT_EXPR, I_type_ptr, p0);
   (*params)[0] = p0; 
   /* Convert new value to required type, and dereference it.  */
+  p1 = fold_convert (I_type_ptr, p1);
   p1 = build_indirect_ref (loc, p1, RO_UNARY_STAR);
-  p1 = build1 (VIEW_CONVERT_EXPR, I_type, p1);
   (*params)[1] = p1;

   /* Move memory model to the 3rd position, and end param list.  */


More information about the Gcc-bugs mailing list