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.  */

Reply via email to