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:56:30 +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 #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
The following ICEs
int a, b;
int main (int n)
{
int foo[n];
__atomic_exchange (&a, &foo, &b, __ATOMIC_RELAXED);
return 0;
}
t.c:8:5: internal compiler error: in tree_to_uhwi, at tree.c:7343
__atomic_exchange (&a, &foo, &b, __ATOMIC_RELAXED);
^~~~~~~~~~~~~~~~~
0x11c50be tree_to_uhwi(tree_node const*)
/space/rguenther/src/svn/trunk/gcc/tree.c:7343
0x857a48 get_atomic_generic_size
/space/rguenther/src/svn/trunk/gcc/c-family/c-common.c:10988
0x857db1 resolve_overloaded_atomic_exchange
/space/rguenther/src/svn/trunk/gcc/c-family/c-common.c:11098
0x858594 resolve_overloaded_builtin(unsigned int, tree_node*, vec<tree_node*,
va_gc, vl_embed>*)
/space/rguenther/src/svn/trunk/gcc/c-family/c-common.c:11394
0x7a0708 c_build_function_call_vec(unsigned int, vec<unsigned int, va_heap,
vl_ptr>, tree_node*, vec<tree_node*, va_gc, vl_embed>*, vec<tree_node*, va_gc,
vl_embed>*)
/space/rguenther/src/svn/trunk/gcc/c/c-typeck.c:3150