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

--- Comment #1 from Manjunath S Matti <mmatti at linux dot vnet.ibm.com> ---
Based on the PR117584 #comment13

The fix is simple 

diff --git a/gcc/gimple-lower-bitint.cc b/gcc/gimple-lower-bitint.cc
index 52d0acad249..e36534ba13d 100644
--- a/gcc/gimple-lower-bitint.cc
+++ b/gcc/gimple-lower-bitint.cc
@@ -4594,8 +4594,9 @@ bitint_large_huge::finish_arith_overflow (tree var, tree
obj, tree type,
                             build_fold_addr_expr (unshare_expr (obj)), off);
          g = gimple_build_call (fn, 3,
                                 build_fold_addr_expr (unshare_expr (obj)),
-                                src, build_int_cst (size_type_node,
-                                                    obj_nelts * m_limb_size));
+                                build_fold_addr_expr (src),
+                                build_int_cst (size_type_node,
+                                               obj_nelts * m_limb_size));
          insert_before (g);
        }
       if (orig_obj == NULL_TREE && obj)


The mentioned test cases on PowerPC64 pass, I have tested this fix on s390
machine (cfarm191.cfarm.net) and I see no regressions.

Reply via email to