This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[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
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 13 Jun 2016 11:18:05 +0000
- Subject: [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
- Auto-submitted: auto-generated
- References: <bug-71514-4 at http dot gcc dot gnu dot org/bugzilla/>
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. */