This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/56961] stack overflow in gimplifier with volatile field
- From: "paolo.carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 05 Jun 2014 12:15:54 +0000
- Subject: [Bug c++/56961] stack overflow in gimplifier with volatile field
- Auto-submitted: auto-generated
- References: <bug-56961-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56961
--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> ---
I think this is another manifestation of the issue discussed in cp-gimplify.c:
/* Remove any copies of empty classes. We check that the RHS
has a simple form so that TARGET_EXPRs and non-empty
CONSTRUCTORs get reduced properly, and we leave the return
slot optimization alone because it isn't a copy (FIXME so it
shouldn't be represented as one).
Also drop volatile variables on the RHS to avoid infinite
recursion from gimplify_expr trying to load the value. */
note that it happens only when struct foo is empty...