This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/56961] stack overflow in gimplifier with volatile field


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...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]