[Bug c++/65525] ICE: sorry, unimplemented: unexpected AST of kind mem_ref (-std=c++14, ICE: in potential_constant_expression_1, at cp/constexpr.c:4432)
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Mar 24 10:29:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65525
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Ah, and that was me:
2011-08-12 Richard Guenther <rguenther@suse.de>
* call.c (build_over_call): Instead of memcpy use an
assignment of two MEM_REFs.
which implements memcpy as *(char[n])ptr1 = *(char[n])ptr2;
But we ask
#4 0x000000000097fdb9 in potential_rvalue_constant_expression (
t=<compound_expr 0x7ffff6a377a8>)
at /space/rguenther/src/svn/trunk/gcc/cp/constexpr.c:4478
(gdb) p debug_generic_expr (expression)
MEM[(struct A *)&y] = MEM[(struct A *)(const struct A &) (const struct A *)
&a];, y
so I wonder why we look at the side-effects at all? That is, why does
COMPOUND_EXPR handling not return false on side-effects early?
More information about the Gcc-bugs
mailing list